I'm having a problem with this implementation:
if(blueActive) {
blueFormat = new LineAndPointFormatter(Color.rgb(0,0,255), null, null);
blue = new SimpleXYSeries(xArray,yArray, selectedDate);
Log.e(TAG , "blueActive");
cvPlot.addSeries(blue, blueFormat);
}
if(redActive) {
redFormat = new LineAndPointFormatter(Color.rgb(255,0,0), null, null);
red = new SimpleXYSeries(xArray,yArray, selectedDate);
Log.e(TAG , "redActive");
cvPlot.addSeries(red, redFormat);
}
if(greenActive) {
greenFormat = new LineAndPointFormatter(Color.rgb(0,255,0), null, null);
green = new SimpleXYSeries(xArray,yArray, selectedDate);
Log.e(TAG , "greenActive");
cvPlot.addSeries(green, greenFormat);
}
cvPlot.redraw();
The series are plotted with the correct xArray and yArray, but when the graph redraws, all the plots are the same color. I'm looking for this code to redraw the plot with three different colors. Am I doing something logically wrong here?