addAnnotation(pointer) doesn't work for CandlestickChart
Posted: Wed Feb 13, 2008 3:46 pm
Hi,
is it true, that addAnnotation doesn't work for CandlestickChart? If yes, what can I use as an alternative?
COde:
thank you.
is it true, that addAnnotation doesn't work for CandlestickChart? If yes, what can I use as an alternative?
COde:
Code: Select all
JFreeChart chart = ChartFactory.createCandlestickChart("TradeGraph", "day", "value", highLowDataset, true);
XYPlot xy = chart.getXYPlot();
XYPointerAnnotation pointer2 = new XYPointerAnnotation(
"Best Bid", 10, 163.0, 3.0 * Math.PI / 4.0
);
pointer2.setTipRadius(1.0);
pointer2.setBaseRadius(750.0);
pointer2.setFont(new Font("SansSerif", Font.PLAIN, 9));
pointer2.setPaint(Color.blue);
pointer2.setTextAnchor(TextAnchor.HALF_ASCENT_RIGHT);
xy.addAnnotation(pointer2);