I am trying to display a plot that will have different colors at specific time-periods.

The only way I managed to do that was by chopping the initial data series into parts and adding them in the appropriate order in the dataset to be plotted. For example if the default color of the plot is blue and I wanted to highlight two time-periods (e.g. color red), I would have a dataset comprised by 5 data series:

dataset.add(blue) initial plot

dataset.add(red) highlight 1

dataset.add(blue) initial plot continued

dataset.add(red) highlight 2

dataset.add(blue) initial plot continued

The points in the domain axis that connect each of the 5 parts of the dataset are ordered. However I have a problem with the domain axis. Each point in the data series is instantiated appropriately (i guess, since the aligning of the domain axis works fine for dataseries that have the same start and end points)

milliseconds = ts.getTime() + (ts.getNanos() / 1000000);
date = new Date(milliseconds);
intYear = date.getYear() + 1900;
year = new Year(intYear);
intMonth = date.getMonth();
month = new Month(intMonth, year);
intDay = date.getDate();
day = new Day(intDay, month.getMonth(), year.getYear());
hour = new Hour(date.getHours(), day);
minute = new Minute(date.getMinutes(), hour);

tpVal = new TimePeriodValue(minute, watts);

This image has the domain axis zoomed in multiple times. The domain axis ranges from 00:00:00 to 23:59:59 http://i.imgur.com/c7TDY.jpg
The initial chart without zooming is like this http://i.imgur.com/esEc5.jpg

Is there a way to fix the alignment of the domain axis so I can have the plot displayed properly without the need to zoom in? For example, if I don't "chop" the initial data series into parts and using the same chart configuration the chart looks like this http://i.imgur.com/oYJAA.jpg