afreechart/src/main/java/org/afree/chart/ChartFactory.java
/**
     * Creates and returns a default instance of a high-low-open-close chart.
     *
     * @param title  the chart title (<code>null</code> permitted).
     * @param timeAxisLabel  a label for the time axis (<code>null</code>
     *                       permitted).
     * @param valueAxisLabel  a label for the value axis (<code>null</code>
     *                        permitted).
     * @param dataset  the dataset for the chart (<code>null</code> permitted).
     * @param legend  a flag specifying whether or not a legend is required.
     *
     * @return A high-low-open-close chart.
     */
Creates and returns a default instance of a high-low-open-close chart.
@param title  the chart title (null permitted).
@param timeAxisLabel  a label for the time axis (null
permitted).
@param valueAxisLabel  a label for the value axis (null
permitted).
@param dataset  the dataset for the chart (null permitted).
@param legend  a flag specifying whether or not a legend is required.

@return A high-low-open-close chart.
Creates and returns a default instance of a high - low - open - close chart . @param title the chart title ( null permitted ) . @param timeAxisLabel a label for the time axis ( null permitted ) . @param valueAxisLabel a label for the value axis ( null permitted ) . @param dataset the dataset for the chart ( null permitted ) . @param legend a flag specifying whether or not a legend is required . @return A high - low - open - close chart .
public static AFreeChart createHighLowChart(String title,
                                                String timeAxisLabel,
                                                String valueAxisLabel,
                                                OHLCDataset dataset,
                                                boolean legend) {
        ValueAxis timeAxis = new DateAxis(timeAxisLabel);
        NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
        HighLowRenderer renderer = new HighLowRenderer();
        XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
        AFreeChart chart = new AFreeChart(title, AFreeChart.DEFAULT_TITLE_FONT,
                plot, legend);
        return chart;
    }
public static AFreeChart createHighLowChart ( String title , String timeAxisLabel , String valueAxisLabel , OHLCDataset dataset , boolean legend ) { ValueAxis timeAxis = new DateAxis ( timeAxisLabel ) ; NumberAxis valueAxis = new NumberAxis ( valueAxisLabel ) ; HighLowRenderer renderer = new HighLowRenderer ( ) ; XYPlot plot = new XYPlot ( dataset , timeAxis , valueAxis , renderer ) ; AFreeChart chart = new AFreeChart ( title , AFreeChart . DEFAULT_TITLE_FONT , plot , legend ) ; return chart ; }
Creates and returns a default instance of a high-low-open-close chart.
Creates and returns a default instance of a high - low - open - close chart .
// Generate Axis objects. // Generate renderer. //renderer.setBaseToolTipGenerator(new HighLowItemLabelGenerator()); // Generate plot object. // Generate AFreeChart object. //currentTheme.apply(chart);