Conversation
…() functionality to cover datetime sequences (fixes issue plotly#3065)
|
@emilykl please review |
|
@m-ad Thank you for the PR! I'm open to something along these lines as a "patch" fix to enable Ultimately, now that shape labels are natively supported in Plotly.js, I think the longer-term fix here is to refactor Otherwise, something like what you've proposed here will work as a temporary fix. There's a few issues with the logic as written; for example, falling back to returning That means cases like the reproducible example in #3065, where the date value is passed as a string, will require a different approach. I'm not sure exactly what the best approach is; trying to parse every value as a datetime seems a bit clunky, but technically speaking it will produce the correct result. Or maybe we just document this limitation and specify that if you are trying to use |
|
@m-ad since we haven't seen any activity on this PR in a while, we may close it in the near future. Let us know if you are still working on it! |
@robertclaus I am not currently working on it. This is a is a band-aid-style fix and as @emilykl said, the nicer and more "correct" version would be to implement the changes to |
This PR extends the
_mean()function inshapeannotation.pyto allow for sequences ofdatetimeobjects as input. This fixes issue #3065, specifically it enables annotations onhline/vlineobjects that usedatetimeaxes.Code PR
plotly.graph_objects, my modifications concern the code generator and not the generated files.