✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Daterangepicker with plotly graph_objects

Hi,
I’m using plotly to creat charts in my Flask app.
I would like to know if there is any possibility to create a daterangepicker with plotly (not using dash).
Or is there any other way to filter the dates on a chart using a precise date (filtering with a calendar for example) ?

Thanks.

Hi @Cheen, welcome to the forum! You have several options, none of them is as good as using a Dash daterangepicker though.
You can use a range-slider to select a time interval, this is probably the easiest option. Or you can add sliders or dropdowns to choose the start and end date, and configure the updatemenus attribute to change the range of the plot when one of the controls is changed.

1 Like

Thank you Emmanuelle for your answer :slight_smile:.
I will try to do that using a form element in which the type will be “date” and I will use the dates selected by the user to change the axes range, my only problem was that I still have difficulties to understand well plotly because I use a python and javascript part of plotly to plot charts on my flask app.
Next time I will consider using dash for more simplicity.

If you want to embed a Dash app into your Flask app, there is a documentation page for this.

Exactly what I needed, thank you.