I draw TimeTableXYDatasetwith StackedXYBarRenderer. Unfortunately, the colors of each series change when updated.
I know how to set colors using the setSeriesPaintrenderer method , but takes an integer index as an argument. I create my datapoints using a string as the name of the series:
ds.add(new SimpleTimePeriod(us.getDate(),
new Date(us.getDate().getTime() + 1000*60)),
us.getTotal(), us.getName()));
How do I know the mapping between a series name and a series index so that I can call setSeriesPaint?
source
share