I had a request to add a 10 year average to some of my charts. Using PHP and MySQL queries for charts of counts by date. http://www.ykfp.org/php/lyletrap/lylesteelheadurl.php?year=2015
Are there any examples of this in the chart director docs? Looking at my sources now, trying to decide if I should create the average data array with a SQL query or calculate the ten year average in PHP.
From your chart, it looks like you have some arrays of values from 05/01/2015 to 04/30/ 2016. For your average line, you can create an array of the same size. For each record in your query (which includes 3 columns for the month, day and avg), you can use your own code to determine the position should of that column in the array. For example, if the month is 5 and the day is 1, then you know it should be the first element of the day. If the month is 12 and day is 27, then it should be in the position that corresponds to 12/27/2015. In this way, you can get your avg data aligned properly with your other data.