Make 2 named ranges (one for the dates and one for the values) like the hard coded ranges you put inthe 2nd chart.

Also need to use the $ to lock the cell reference.

MyDates : =AVERAGE(OFFSET($M$1,0,-12,1,12))
MyVals: =AVERAGE(OFFSET($M$3,0,-12,1,12))

Then modify the chart to use those names instead of the hard coded ranges.