Hello,
I’m getting the following error when I try to annotate a vline using the “annotate_text” argument in the “add_vline” method:
TypeError: unsupported operand type(s) for +: 'int' and 'datetime.datetime'
The x-value is a datetime.datetime type. If I change the x to float or int, it does not give the error. The behavior is the same on the “add_hline” method.
Dug into a bit, was able to get it to work by moving the “_mean” function calls to just before they are needed in the hline and vline blocks. Obviously this is not ideal because it’d require changing the call in multiple places (and would not address angled lines from what I understand of the code).
It looks like (2) values are being passed in for all uses in this file, so would finding the point that is equidistant between the x0 and x1 values provide the expected results?
We’ve started adding a trace to do the same thing, which has some other benefits (can add to legend, hover info, etc).
I could put in a PR assuming that mean is finding the half way point, just need to find some time between work and prepping the best for the new bebs.