Date Buttons on Line Charts
Explore how to enhance Plotly line charts by adding interactive date buttons. Understand how to configure button properties like count, label, and step to filter stock price data dynamically, enabling efficient time-series analysis without manual data subsetting.
We'll cover the following...
We'll cover the following...
Our data
For this lesson, let’s use some data on the stock price of Alibaba. We can print out the top few rows to see what it looks like below:
Let’s plot all of the data to ascertain the patterns in the data:
Now we could use pandas and filter the data so that we only get the range we are interested in, but it turns out that we can filter by date effortlessly using Plotly functionality. This introduces us to the next ...