Skip to content

Commit dc4c280

Browse files
committed
Auto-converts PlotLine.value from datetime to numeric. Closes #58
1 parent eff843c commit dc4c280

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

highcharts_core/options/axes/plot_bands.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ def value(self) -> Optional[int | float | Decimal]:
349349

350350
@value.setter
351351
def value(self, value):
352+
if hasattr(value, 'timestamp'):
353+
value = value.timestamp() * 1000
354+
352355
self._value = validators.numeric(value, allow_empty = True)
353356

354357
@property

0 commit comments

Comments
 (0)