Behind the chart you find a pivot table.
The macro update the pivot table and the chart.