-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fig.add_vline
on date axis fails with date, timestamp and string as x
value
#4923
Comments
@stoney95 please let us know which version of plotly you are using - thanks. |
@gvwilson I am using |
I will be stating the obvious here: in annotation_param_per_line the computation of mean X and mean Y could be postponed for only those cases that actually requires them. In this way at least all other operation could run, leaving out the following combinations:
For these cases a check on the X and/or Y type to be numeric could be performed (maybe even in |
I will defer to @emilykl on this one - sadly (tragically) I'm not familiar enough with the code for any of this to be obvious to me any longer :-( |
This bug was reported a few years ago; there's a workaround on the issue: #3065 I experience the same error with |
@emilykl if no one is taking a look at this I am happy to give it a try. I wonder what's the expected behavior for date, datetime, timestamp and string types for the cases mentioned above, namely:
|
I build a line chart with dates on the x-axis. I want to add a vertical line at a certain x-position. Using a timestamp, date or date-formated string as value for
x
fails.Example
Error Message
Expected behavior
The line is added at the provided date.
Additional context
Using
fig.add_vrect
with dates worksThe text was updated successfully, but these errors were encountered: