'Python Auto-Aggregate Button on line graph?

I have process that collects two different data points every minute. Currently I'm simply displaying the data summed by hourly increments using matplotlib like this...

https://www.python-graph-gallery.com/area-fill-between-two-lines-in-matplotlib

However, I'd like to create a line graph that displays all the readings of both data points, but also include the options for the viewer to select buttons on the graph to show the process sums over 15 minute, 1 hour, 6 hours, and even 1 day increments. Is this possible using one of the many python libraries?

Note: I've found creative ways to "zoom" in on sections of the data, but this is NOT what I'm looking for. I'd like to sum the data over the intervals for my chart on the click of a button.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source