Unrecognized date and negative value is not valid

Hi, I’m plotting a multiple time series traces (lines) and once in a while I get this error (actually, 2/4 times). I’m yet to narrow it down, but is there any insight on what could be wrong?

I have strict validation on the date formats and all the dates pass the validation before going to plotly.
Thanks.

“Error: attribute width: A negative value is not valid. (”-60")"
“plotly-latest.min.js:7 ERROR: unrecognized date undefined
M @ plotly-latest.min.js:7
w.error @ plotly-latest.min.js:7
ut.cleanDate @ plotly-latest.min.js:7
t.cleanRange @ plotly-latest.min.js:7
t.setScale @ plotly-latest.min.js:7
Vm.lsInner @ plotly-latest.min.js:7
oe.syncOrAsync @ plotly-latest.min.js:7
Vm.layoutStyles @ plotly-latest.min.js:7
oe.syncOrAsync @ plotly-latest.min.js:7
ay.plot @ plotly-latest.min.js:7
P.call @ plotly-latest.min.js:7
An.doAutoMargin @ plotly-latest.min.js:7
An.supplyDefaults @ plotly-latest.min.js:7
ay.react @ plotly-latest.min.js:7
renderCpuGraph”

That looks like a bug. Thanks for writing in.

Now, would you mind sharing a reproducible example on https://github.com/plotly/plotly.js/issues/new to help us fix this thing? Thanks!

I think I narrowed it down to the fact that the div that I’m using is hidden at the time when Plotly.react is called. Now, I’m just calling the Plotly.Plots.resize when the div becomes visible and so the problem is worked-around.

Looks like you need div dimensions… (the exception is misleading, so it would be helpful if there’s a more direct error for the fact that div is hidden).

Cheers.

This appears related to https://github.com/plotly/plotly.js/pull/2482

You might want to subscribe to that ticket for the latest development info.

1 Like