Skip to content

Commit e133544

Browse files
authored
Fix trendlines for datetimes (plotly#3683)
1 parent a8a0c9b commit e133544

File tree

1 file changed

+1
-1
lines changed
  • packages/python/plotly/plotly/express

1 file changed

+1
-1
lines changed

Diff for: packages/python/plotly/plotly/express/_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def make_trace_kwargs(args, trace_spec, trace_data, mapping_labels, sizeref):
328328
x = sorted_trace_data[args["x"]].values
329329

330330
if x.dtype.type == np.datetime64:
331-
x = x.astype(int) / 10**9 # convert to unix epoch seconds
331+
x = x.astype(np.int64) / 10**9 # convert to unix epoch seconds
332332
elif x.dtype.type == np.object_:
333333
try:
334334
x = x.astype(np.float64)

0 commit comments

Comments
 (0)