Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Fill between two vertical lines but multiple times #176

Open
PaulForInvent opened this issue Aug 21, 2021 · 0 comments
Open

Fill between two vertical lines but multiple times #176

PaulForInvent opened this issue Aug 21, 2021 · 0 comments

Comments

@PaulForInvent
Copy link

PaulForInvent commented Aug 21, 2021

Hey, I wonder how I can do that.

I tried it the follwoing way, but it also need very much time if you have a lot of add_vrect to add...

I calculated beforehand the needed start and end positions for each single add_vrect.

But this somehow seems not working as all of the chart is filled...

Maybe is it he time format? My Time format is like: 2021-07-15T01:00:00.000000000.

How can I do this more simpler of without a for loop to be more efficient?

  for index, row in enumerate(first):
       start = row
       end = last[index]

       fig.add_vrect(x0=start, x1=end,
                     annotation_text="decline", annotation_position="top left",
                     fillcolor="green", opacity=0.25, line_width=1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant