Series color

How can I change the color of a series. I have an XYline series and I want the first half to be red and the second half to be yellow? 

Line series have a single color, i.e. the line color of the series.
You could add the data as two series with each series a different line color.