From d08e0c0364f832d49ed948a5b2a1243f884f6ae9 Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Mon, 9 May 2022 20:31:37 -0400 Subject: [PATCH] use line-dash validators everywhere possible (#3722) --- packages/python/plotly/codegen/utils.py | 25 +++---------------- .../plotly/plotly/graph_objs/carpet/_aaxis.py | 20 +++++++-------- .../plotly/plotly/graph_objs/carpet/_baxis.py | 20 +++++++-------- .../graph_objs/funnel/connector/_line.py | 10 ++++---- .../plotly/plotly/graph_objs/layout/_xaxis.py | 20 +++++++-------- .../plotly/plotly/graph_objs/layout/_yaxis.py | 20 +++++++-------- .../plotly/graph_objs/layout/geo/_lataxis.py | 10 ++++---- .../plotly/graph_objs/layout/geo/_lonaxis.py | 10 ++++---- .../graph_objs/layout/newshape/_line.py | 10 ++++---- .../graph_objs/layout/polar/_angularaxis.py | 10 ++++---- .../graph_objs/layout/polar/_radialaxis.py | 10 ++++---- .../plotly/graph_objs/layout/shape/_line.py | 10 ++++---- .../graph_objs/layout/smith/_imaginaryaxis.py | 10 ++++---- .../graph_objs/layout/smith/_realaxis.py | 10 ++++---- .../graph_objs/layout/ternary/_aaxis.py | 10 ++++---- .../graph_objs/layout/ternary/_baxis.py | 10 ++++---- .../graph_objs/layout/ternary/_caxis.py | 10 ++++---- .../plotly/graph_objs/layout/xaxis/_minor.py | 10 ++++---- .../plotly/graph_objs/layout/yaxis/_minor.py | 10 ++++---- .../plotly/graph_objs/scattersmith/_line.py | 10 ++++---- .../graph_objs/waterfall/connector/_line.py | 10 ++++---- .../validators/carpet/aaxis/_griddash.py | 2 +- .../validators/carpet/aaxis/_minorgriddash.py | 2 +- .../validators/carpet/baxis/_griddash.py | 2 +- .../validators/carpet/baxis/_minorgriddash.py | 2 +- .../validators/funnel/connector/line/_dash.py | 2 +- .../layout/geo/lataxis/_griddash.py | 2 +- .../layout/geo/lonaxis/_griddash.py | 2 +- .../validators/layout/newshape/line/_dash.py | 2 +- .../layout/polar/angularaxis/_griddash.py | 2 +- .../layout/polar/radialaxis/_griddash.py | 2 +- .../validators/layout/shape/line/_dash.py | 2 +- .../layout/smith/imaginaryaxis/_griddash.py | 2 +- .../layout/smith/realaxis/_griddash.py | 2 +- .../layout/ternary/aaxis/_griddash.py | 2 +- .../layout/ternary/baxis/_griddash.py | 2 +- .../layout/ternary/caxis/_griddash.py | 2 +- .../validators/layout/xaxis/_griddash.py | 2 +- .../validators/layout/xaxis/_spikedash.py | 2 +- .../layout/xaxis/minor/_griddash.py | 2 +- .../validators/layout/yaxis/_griddash.py | 2 +- .../validators/layout/yaxis/_spikedash.py | 2 +- .../layout/yaxis/minor/_griddash.py | 2 +- .../validators/scattersmith/line/_dash.py | 2 +- .../waterfall/connector/line/_dash.py | 2 +- 45 files changed, 148 insertions(+), 165 deletions(-) diff --git a/packages/python/plotly/codegen/utils.py b/packages/python/plotly/codegen/utils.py index 2b70add65b..5bdf3d05c1 100644 --- a/packages/python/plotly/codegen/utils.py +++ b/packages/python/plotly/codegen/utils.py @@ -180,25 +180,6 @@ def format_description(desc): "frame.layout": "plotly.validators.LayoutValidator", } -# Add custom dash validators -CUSTOM_VALIDATOR_DATATYPES.update( - { - prop: "_plotly_utils.basevalidators.DashValidator" - for prop in [ - "scatter.line.dash", - "histogram2dcontour.line.dash", - "scattergeo.line.dash", - "scatterpolar.line.dash", - "ohlc.line.dash", - "ohlc.decreasing.line.dash", - "ohlc.increasing.line.dash", - "contourcarpet.line.dash", - "contour.line.dash", - "scatterternary.line.dash", - "scattercarpet.line.dash", - ] - } -) # Mapping from property string (as found in plot-schema.json) to a custom # class name. If not included here, names are converted to TitleCase and @@ -435,9 +416,11 @@ def name_base_validator(self) -> str: str """ if self.path_str in CUSTOM_VALIDATOR_DATATYPES: - validator_base = f"{CUSTOM_VALIDATOR_DATATYPES[self.path_str]}" + validator_base = CUSTOM_VALIDATOR_DATATYPES[self.path_str] elif self.plotly_name.endswith("src") and self.datatype == "string": - validator_base = f"_plotly_utils.basevalidators." f"SrcValidator" + validator_base = "_plotly_utils.basevalidators.SrcValidator" + elif self.plotly_name.endswith("dash") and self.datatype == "string": + validator_base = "_plotly_utils.basevalidators.DashValidator" elif self.plotly_name == "title" and self.datatype == "compound": validator_base = "_plotly_utils.basevalidators.TitleValidator" else: diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py b/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py index 89a3ecf55a..41bb446450 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py @@ -551,11 +551,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- @@ -838,11 +838,11 @@ def minorgriddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'minorgriddash' 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 + The 'minorgriddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py b/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py index 82c7a246c9..f538741349 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py @@ -551,11 +551,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- @@ -838,11 +838,11 @@ def minorgriddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'minorgriddash' 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 + The 'minorgriddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py b/packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py index 0771bf8e8f..3439f83ece 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/connector/_line.py @@ -79,11 +79,11 @@ def dash(self): "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 + 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py index d5003c40c2..958f173f10 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py @@ -671,11 +671,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- @@ -1735,11 +1735,11 @@ def spikedash(self): "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 + The 'spikedash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py index 57f6d96063..fedb49deb3 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py @@ -669,11 +669,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- @@ -1606,11 +1606,11 @@ def spikedash(self): "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 + The 'spikedash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py b/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py index 696bb10e6c..be44d0c62f 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/_lataxis.py @@ -107,11 +107,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/geo/_lonaxis.py b/packages/python/plotly/plotly/graph_objs/layout/geo/_lonaxis.py index b3e5dbd32b..5d36dd6fbc 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/geo/_lonaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/geo/_lonaxis.py @@ -107,11 +107,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/newshape/_line.py b/packages/python/plotly/plotly/graph_objs/layout/newshape/_line.py index 5b7b8df9c3..9c51291268 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/newshape/_line.py +++ b/packages/python/plotly/plotly/graph_objs/layout/newshape/_line.py @@ -80,11 +80,11 @@ def dash(self): "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 + 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py b/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py index 57fc27f258..9e884a801d 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py @@ -381,11 +381,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py b/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py index 2f516c6b8a..e6bad1d40c 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py @@ -440,11 +440,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/shape/_line.py b/packages/python/plotly/plotly/graph_objs/layout/shape/_line.py index 70f90dbb34..cdddbeee78 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/shape/_line.py +++ b/packages/python/plotly/plotly/graph_objs/layout/shape/_line.py @@ -79,11 +79,11 @@ def dash(self): "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 + 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/smith/_imaginaryaxis.py b/packages/python/plotly/plotly/graph_objs/layout/smith/_imaginaryaxis.py index b8266ff1ea..04838ec6ed 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/smith/_imaginaryaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/smith/_imaginaryaxis.py @@ -166,11 +166,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py b/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py index f4fe53938a..dda9cc6c7f 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py @@ -168,11 +168,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py index ab29ae2d0f..1458135764 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py @@ -246,11 +246,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py index 62dd107af4..71cadbd49c 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py @@ -246,11 +246,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py index cf487ab2fc..d8ea08782a 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py @@ -246,11 +246,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_minor.py b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_minor.py index 7a45608865..08ccaacfc7 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/xaxis/_minor.py +++ b/packages/python/plotly/plotly/graph_objs/layout/xaxis/_minor.py @@ -132,11 +132,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/yaxis/_minor.py b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_minor.py index d416e4cac4..c48c590f84 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/yaxis/_minor.py +++ b/packages/python/plotly/plotly/graph_objs/layout/yaxis/_minor.py @@ -132,11 +132,11 @@ def griddash(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). - The 'griddash' 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 + The 'griddash' 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattersmith/_line.py b/packages/python/plotly/plotly/graph_objs/scattersmith/_line.py index 1cdcb7aae1..c4f772e988 100644 --- a/packages/python/plotly/plotly/graph_objs/scattersmith/_line.py +++ b/packages/python/plotly/plotly/graph_objs/scattersmith/_line.py @@ -79,11 +79,11 @@ def dash(self): "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 + 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 ------- diff --git a/packages/python/plotly/plotly/graph_objs/waterfall/connector/_line.py b/packages/python/plotly/plotly/graph_objs/waterfall/connector/_line.py index 37bfa9068a..28924db864 100644 --- a/packages/python/plotly/plotly/graph_objs/waterfall/connector/_line.py +++ b/packages/python/plotly/plotly/graph_objs/waterfall/connector/_line.py @@ -79,11 +79,11 @@ def dash(self): "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 + 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 ------- diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_griddash.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_griddash.py index 8b05ca3056..e5aa719beb 100644 --- a/packages/python/plotly/plotly/validators/carpet/aaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="griddash", parent_name="carpet.aaxis", **kwargs): super(GriddashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgriddash.py b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgriddash.py index a47b91cb45..e6b36727aa 100644 --- a/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgriddash.py +++ b/packages/python/plotly/plotly/validators/carpet/aaxis/_minorgriddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class MinorgriddashValidator(_plotly_utils.basevalidators.StringValidator): +class MinorgriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="minorgriddash", parent_name="carpet.aaxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_griddash.py b/packages/python/plotly/plotly/validators/carpet/baxis/_griddash.py index ebcdd9d5eb..da58807f1f 100644 --- a/packages/python/plotly/plotly/validators/carpet/baxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="griddash", parent_name="carpet.baxis", **kwargs): super(GriddashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/carpet/baxis/_minorgriddash.py b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgriddash.py index aa400657f1..2459307360 100644 --- a/packages/python/plotly/plotly/validators/carpet/baxis/_minorgriddash.py +++ b/packages/python/plotly/plotly/validators/carpet/baxis/_minorgriddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class MinorgriddashValidator(_plotly_utils.basevalidators.StringValidator): +class MinorgriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="minorgriddash", parent_name="carpet.baxis", **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 index 52f02a8846..ade52e5070 100644 --- a/packages/python/plotly/plotly/validators/funnel/connector/line/_dash.py +++ b/packages/python/plotly/plotly/validators/funnel/connector/line/_dash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class DashValidator(_plotly_utils.basevalidators.StringValidator): +class DashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="dash", parent_name="funnel.connector.line", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_griddash.py index e37f36453f..848516d989 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/lataxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/geo/lataxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.geo.lataxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_griddash.py index 2b1913a842..daad35c60f 100644 --- a/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/geo/lonaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.geo.lonaxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/newshape/line/_dash.py b/packages/python/plotly/plotly/validators/layout/newshape/line/_dash.py index fd30b85a5a..8cc38e9dfe 100644 --- a/packages/python/plotly/plotly/validators/layout/newshape/line/_dash.py +++ b/packages/python/plotly/plotly/validators/layout/newshape/line/_dash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class DashValidator(_plotly_utils.basevalidators.StringValidator): +class DashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="dash", parent_name="layout.newshape.line", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_griddash.py index 918e28119a..b5c0d236df 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/polar/angularaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.polar.angularaxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_griddash.py index b6800eede8..004ade41b0 100644 --- a/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/polar/radialaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.polar.radialaxis", **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 index 91746491b6..86b5e089a8 100644 --- a/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py +++ b/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class DashValidator(_plotly_utils.basevalidators.StringValidator): +class DashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="dash", parent_name="layout.shape.line", **kwargs): super(DashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/layout/smith/imaginaryaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/smith/imaginaryaxis/_griddash.py index b550d79fb2..81af5c4040 100644 --- a/packages/python/plotly/plotly/validators/layout/smith/imaginaryaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/smith/imaginaryaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.smith.imaginaryaxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/smith/realaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/smith/realaxis/_griddash.py index ec9211a207..a5a842d5a6 100644 --- a/packages/python/plotly/plotly/validators/layout/smith/realaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/smith/realaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.smith.realaxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_griddash.py index 7d3bd9d3a9..f8df3bd1aa 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/aaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.ternary.aaxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_griddash.py index 3d5b2c8112..5212538f67 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/baxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/baxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.ternary.baxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_griddash.py index 4edb8b927d..6336c362d2 100644 --- a/packages/python/plotly/plotly/validators/layout/ternary/caxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/ternary/caxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.ternary.caxis", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/xaxis/_griddash.py index 105f202b34..db0cb6e991 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="griddash", parent_name="layout.xaxis", **kwargs): super(GriddashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/_spikedash.py b/packages/python/plotly/plotly/validators/layout/xaxis/_spikedash.py index 65105e23ed..b2a425bbe1 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/_spikedash.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/_spikedash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class SpikedashValidator(_plotly_utils.basevalidators.StringValidator): +class SpikedashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="spikedash", parent_name="layout.xaxis", **kwargs): super(SpikedashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/layout/xaxis/minor/_griddash.py b/packages/python/plotly/plotly/validators/layout/xaxis/minor/_griddash.py index 8cea71f458..49893ff157 100644 --- a/packages/python/plotly/plotly/validators/layout/xaxis/minor/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/xaxis/minor/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.xaxis.minor", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_griddash.py b/packages/python/plotly/plotly/validators/layout/yaxis/_griddash.py index 86c04db2e7..3bfd34783b 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="griddash", parent_name="layout.yaxis", **kwargs): super(GriddashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/_spikedash.py b/packages/python/plotly/plotly/validators/layout/yaxis/_spikedash.py index 70a5c97ac9..8f2ae4012d 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/_spikedash.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/_spikedash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class SpikedashValidator(_plotly_utils.basevalidators.StringValidator): +class SpikedashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="spikedash", parent_name="layout.yaxis", **kwargs): super(SpikedashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/layout/yaxis/minor/_griddash.py b/packages/python/plotly/plotly/validators/layout/yaxis/minor/_griddash.py index 5f3a019603..1ca8429bf7 100644 --- a/packages/python/plotly/plotly/validators/layout/yaxis/minor/_griddash.py +++ b/packages/python/plotly/plotly/validators/layout/yaxis/minor/_griddash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class GriddashValidator(_plotly_utils.basevalidators.StringValidator): +class GriddashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.yaxis.minor", **kwargs ): diff --git a/packages/python/plotly/plotly/validators/scattersmith/line/_dash.py b/packages/python/plotly/plotly/validators/scattersmith/line/_dash.py index f6bc53515b..d6a30b773e 100644 --- a/packages/python/plotly/plotly/validators/scattersmith/line/_dash.py +++ b/packages/python/plotly/plotly/validators/scattersmith/line/_dash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class DashValidator(_plotly_utils.basevalidators.StringValidator): +class DashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="dash", parent_name="scattersmith.line", **kwargs): super(DashValidator, self).__init__( plotly_name=plotly_name, diff --git a/packages/python/plotly/plotly/validators/waterfall/connector/line/_dash.py b/packages/python/plotly/plotly/validators/waterfall/connector/line/_dash.py index 84dded5ec3..ed8535717e 100644 --- a/packages/python/plotly/plotly/validators/waterfall/connector/line/_dash.py +++ b/packages/python/plotly/plotly/validators/waterfall/connector/line/_dash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class DashValidator(_plotly_utils.basevalidators.StringValidator): +class DashValidator(_plotly_utils.basevalidators.DashValidator): def __init__( self, plotly_name="dash", parent_name="waterfall.connector.line", **kwargs ):