我正在使用JFreeChart
在我的Java应用程序中创建蜡烛图。但是,我的图表最终看起来像这样:
http://imageshack.us/photo/my-images/69/capturebhx.png/
http://imageshack.us/photo/my-images/717/capture2wl.png/
org.jfree.chart.axis.NumberAxis.configure()
可以做到这一点,但我不确定。我似乎找不到将我的JFreeChart
对象或ChartPanel
对象与此NumberAxis
对象绑定的方法。请帮助我,我迷失了,已经寻找了很长时间以尝试将这些对象联系在一起。或者,如果您能找到另一种方法,那也太好了!
一些代码:
...
private DefaultHighLowDataset dataset;
private JFreeChart chart;
private ChartPanel chart_panel;
...
// creates dataset, then chart from dataset, then chart_panel from chart
dataset = new DefaultHighLowDataset("", date, high, low, open, close, volume);
chart = ChartFactory.createCandlestickChart("Blank", "Time", "Price", dataset, false);
chart_panel = new ChartPanel(chart); // what you see in the images
...