Hi,
I need to set the outline paint for my candlestick chart. I am trying to use the commented out code in CandlestickChartDemo1 version 1.0.5. However I am getting a compile error at renderer.setUseOutlinePaint(true). (The api says that this method is available. )When I don't use it and go directly to renderer.setOutlinePaint(Color.gray) I don't get a gray outline, just the default green and red colors. Please help.
private static JFreeChart createChart(OHLCDataset dataset) {
JFreeChart chart = ChartFactory.createCandlestickChart(
"Candlestick Demo 1",
"Time",
"Value",
dataset,
true
);
XYPlot plot = (XYPlot) chart.getPlot();
NumberAxis axis = (NumberAxis) plot.getRangeAxis();
axis.setAutoRangeIncludesZero(false);
axis.setUpperMargin(0.0);
axis.setLowerMargin(0.0);
CandlestickRenderer renderer = (CandlestickRenderer) plot.getRenderer();
renderer.setUseOutlinePaint(true);
renderer.setOutlinePaint(Color.gray);
return chart;
}