File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,14 +60,6 @@ def colors_cycle(hex_colors: Iterable[str] | None = None) -> Iterator[str]:
6060 return cycle (values )
6161
6262
63- def values2json (values : np .ndarray | pd .Series ) -> list :
64- """Converter from numpy/pandas array to plotly compatible list"""
65-
66- if axis_type (values ) == AxisType .date : # plotly wants ISO strings
67- values = datetime2str (values , '%Y-%m-%dT%H:%M:%S' )
68- return array2json (values )
69-
70-
7163def axis_range (values : np .ndarray | pd .Series ) -> list | None :
7264 """
7365 Compute the optimal axis range for the given values
@@ -207,3 +199,12 @@ def _bar_like_trace(
207199 }
208200 }
209201 } | kwargs
202+
203+
204+ def values2json (values : np .ndarray | pd .Series ) -> list :
205+ """Converter from numpy/pandas array to plotly compatible list"""
206+
207+ if axis_type (values ) == AxisType .date : # plotly wants ISO strings
208+ values = datetime2str (values , '%Y-%m-%dT%H:%M:%S' )
209+ return array2json (values )
210+
You can’t perform that action at this time.
0 commit comments