Update graph data with a yield function (intermediate results get sent to graph)

I have a function that crunches some numbers over a couple mins and it yields intermediate results along the way(python yield function). Every time the function yields a new result, I want to send that to the Output(‘my-chart’, ‘figure’) and update the chart.

I know this can be done with a global variable for 1 user, but what about the ‘correct’ way? maybe using dcc store? but then how do I callback to a dcc store from a yield function over and over? No luck with anything I try. Please help!

Thanks,
Nathan