}
if(useLines){
LineAndShapeRenderer lineRenderer = new LineAndShapeRenderer();
//lineRenderer.setShapesFilled(false);
lineRenderer.setShapesFilled(true);
if(additionalLabels){lineRenderer.setBaseItemLabelGenerator(generator);
lineRenderer.setBaseItemLabelFont(new Font(defaultLabelsStyle.getFontName(), Font.PLAIN, defaultLabelsStyle.getSize()));
lineRenderer.setBaseItemLabelPaint(defaultLabelsStyle.getColor());
lineRenderer.setBaseItemLabelsVisible(true);
}
DefaultCategoryDataset datasetLine=(DefaultCategoryDataset)datasets.getDatasets().get("line");
if(enableToolTips){
MyCategoryToolTipGenerator generatorToolTip=new MyCategoryToolTipGenerator(freeToolTips, seriesTooltip, categoriesTooltip, seriesCaptions);
lineRenderer.setToolTipGenerator(generatorToolTip);
}
if(colorMap!=null){
for (Iterator iterator = datasetLine.getRowKeys().iterator(); iterator.hasNext();) {
String serName = (String) iterator.next();
String labelName = "";
int index=-1;
if (seriesCaptions != null && seriesCaptions.size()>0){
labelName = serName;
serName = (String)seriesCaptions.get(serName);
index=datasetLine.getRowIndex(labelName);
}
else
index=datasetLine.getRowIndex(serName);
Color color=(Color)colorMap.get(serName);
if(color!=null){
lineRenderer.setSeriesPaint(index, color);
}
}
}
plot.setDataset(0,datasetLine);
plot.setRenderer(0,lineRenderer);