Apologies for such a detailed question - hopefully save lots of follow-ups!
I have a chart that shows milk collection volumes throughout the year.
The data across any region shows a see-saw pattern as day/night milkings differ, and many farms are only collected every second day.
The purpose of the tool I'm creating for the Transport Manager is to more accurately predict milk volumes for the next few days to optimise tanker allocation to regions.
He selects the first and last date for display, as well as a prediction for up to 7 days ahead. The prediction is based on a variable number of days 'behind', ie. depending on the shape of the recent volumes. He can also select from 10-30 days data to use for the predictions. They can choose from a linear, quadratic and cubic models which improves predictive accuracy.
Because of the see-saw nature of the data, I have separated it into 'odd' and 'even' dates, and I plot two separate series. This allows the predictions to be for the separate trends in both higher and lower values.
So far, all this works fine.
What I'd like to do is to automatically colour the markers on both lines for just the predictions, ie from 'today' to the end of the series. When a new date is selected, it all updates for them.
Depending on the selections there can be up to 200 dates/volumes displayed, but typically 30-ish, with up to 10 more as predictions - the last ones in the series.
How do I select and modify points based either on their X-value, ie date, or based on the point number? Tried lots of variations, but just can't crack this one.
Thanks in advance for your help.