Print

Print


You're correct, each series attributes corresponds to exactly one series.

reviseColor() is a utility method for guaranteeing that a color is valid.  It probably shouldn't be public.

I think what you want is TimeSeriesAttributes.setStrokeColor(...), something like:

	(TimesSeriesAttributes) tsa = (TimeSeriesAttributes)(attrib[0]);
	tsa.setStrokeColor(Color.blue);

Sean


On May 4, 2012, at 2:52 PM, Joaquin Zabalo wrote:

> Thanks. I wasn't aware that the method no longer existed. I revised my code
> as indicated in the following segments:
> 
> TimeSeriesChartGenerator chartgen;
> SeriesAttributes[] attrib = new TimeSeriesAttributes[2];
> XYSeries[] series = new XYSeries[2];
> 
> series[0] = new XYSeries("Fish", false);
> series[1] = new XYSeries("Seal", false);
> 
> chartgen.addSeries(series[0],  null);
> chartgen.addSeries(series[1],  null);
> 
> attrib = chartgen.getSeriesAttributes();
> 
> However, I'm still not sure how to modify a particular series' attributes in
> order to change the line color in the plot. Does each entry in the
> SeriesAttributes array correspond to exactly one time series? If this is so,
> then I assume that to change the color corresponding to series[0], the code
> would read:
> 
> attrib[0].reviseColor(Color.blue, 1.0);
> 
> But this did not work. Maybe SetStrokeColor(Color.blue) should somehow be
> used instead. I don't know.
> 
> Any suggestions?
> 
> Thanks again.