What do I need to research for dynamic updates?

I am new to plotly but have successfully used it to create an area chart that tracks the progress of 5 separate testing fields towards an overall completion goal (i.e. I plot A, B, C, D, E, and A+B+C+D+E).

The user likes the capability they have natively to click to add or remove a given test, but the ‘problem’ is that the sum doesn’t update accordingly. So for instance, let’s say I have 120 tests total, and category C contributes roughly 30 of those at any given time (I’m plotting our status over time, btw). The issue is that if he clicks to remove category C, the total for any given day still shows 120, even though ideally it would now show 90.

To create all this data, I parse a lot of text files and ultimately create lists in python that I upload to plotly. One of those lists is the test total each day (120 in this example), so right now I don’t know what I don’t know. What concept do I need to research to have the plot update its data dynamically depending on what the user is viewing, or is this even possible? Thanks in advance…