);
break;
}
// then customise it a little...
Plot plot = chart.getPlot();
plot.setForegroundAlpha(0.75f);
// NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
// set the background color for the chart...
chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 1000, 0, Color.blue));
if (backgroundFilePath.length() != 0) {
try {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Image image;
if ((new File(backgroundFilePath)).exists()) {
image = toolkit.getImage(backgroundFilePath);
} else {
image = toolkit.getImage(new URL(backgroundFilePath));
}
WaitingImageObserver obs = new WaitingImageObserver(image);
obs.waitImageLoaded();
plot.setBackgroundImage(image);
plot.setBackgroundPaint(Color.white);
plot.setBackgroundAlpha(0.6f);
plot.setForegroundAlpha(0.75f);
} catch (Exception e) {
Log.log(Log.DEBUG, this, "Cannot find file or URL=" + backgroundFilePath + " ; error=" + e);
e.printStackTrace();
}
}