Best way to change values in chart dataset?

Trying to get my head around charts… harder than i thought!

I can draw a simple pie chart on the screen fine, but how can I edit the values in the background and then refresh the chart? I want to use a pie chart to show progress during a long code branch. akin to a progressbar, but round!

I am using the native chart control in Xojo, no external controls.

2 ways

store the ChartCircularDataset in a window property (ds as ChartCircularDataset) and set the data and label once.
then change dataset value in this Dataset
ds.RowAt(0)= r.InRange(100,10000)


replace all (means sales have new values)

Self.ds = New ChartCircularDataset("Sales", sales, Colors)

Chart1.AddLabels("Q1", "Q2", "Q3", "Q4")

perfect, thank you. i did think of the 2nd option but was worried that it was inefficient and would cause flickering