Skip to content

Commit d476dc5

Browse files
committed
rm eGSIM from generated requirements / WIP 3.12 deploy
1 parent 43c79bb commit d476dc5

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

egsim/app/plotly.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff 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-
7163
def 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+

0 commit comments

Comments
 (0)