@Test public void testGetBarChart() throws MarshalException, ValidationException, IOException, SQLException { JFreeChart barChart = ChartUtils.getBarChart("sample-bar-chart"); assertNotNull(barChart); assertEquals(2, barChart.getSubtitleCount()); }
public static JFreeChart getBarChart(String chartName) throws MarshalException, ValidationException, IOException, SQLException { BarChart chartConfig = null; chartConfig = getBarChartConfigByName(chartName); if (chartConfig == null) { throw new IllegalArgumentException("getBarChart: Invalid chart name."); } DefaultCategoryDataset baseDataSet = buildCategoryDataSet(chartConfig); JFreeChart barChart = createBarChart(chartConfig, baseDataSet); addSubTitles(chartConfig, barChart); String subLabelClass = chartConfig.getSubLabelClass(); if(subLabelClass != null) { addSubLabels(barChart, subLabelClass); } customizeSeries(barChart, chartConfig); return barChart; }
ChartUtils { public static JFreeChart getBarChart(String chartName) throws MarshalException, ValidationException, IOException, SQLException { BarChart chartConfig = null; chartConfig = getBarChartConfigByName(chartName); if (chartConfig == null) { throw new IllegalArgumentException("getBarChart: Invalid chart name."); } DefaultCategoryDataset baseDataSet = buildCategoryDataSet(chartConfig); JFreeChart barChart = createBarChart(chartConfig, baseDataSet); addSubTitles(chartConfig, barChart); String subLabelClass = chartConfig.getSubLabelClass(); if(subLabelClass != null) { addSubLabels(barChart, subLabelClass); } customizeSeries(barChart, chartConfig); return barChart; } }
ChartUtils { public static JFreeChart getBarChart(String chartName) throws MarshalException, ValidationException, IOException, SQLException { BarChart chartConfig = null; chartConfig = getBarChartConfigByName(chartName); if (chartConfig == null) { throw new IllegalArgumentException("getBarChart: Invalid chart name."); } DefaultCategoryDataset baseDataSet = buildCategoryDataSet(chartConfig); JFreeChart barChart = createBarChart(chartConfig, baseDataSet); addSubTitles(chartConfig, barChart); String subLabelClass = chartConfig.getSubLabelClass(); if(subLabelClass != null) { addSubLabels(barChart, subLabelClass); } customizeSeries(barChart, chartConfig); return barChart; }  }
ChartUtils { public static JFreeChart getBarChart(String chartName) throws MarshalException, ValidationException, IOException, SQLException { BarChart chartConfig = null; chartConfig = getBarChartConfigByName(chartName); if (chartConfig == null) { throw new IllegalArgumentException("getBarChart: Invalid chart name."); } DefaultCategoryDataset baseDataSet = buildCategoryDataSet(chartConfig); JFreeChart barChart = createBarChart(chartConfig, baseDataSet); addSubTitles(chartConfig, barChart); String subLabelClass = chartConfig.getSubLabelClass(); if(subLabelClass != null) { addSubLabels(barChart, subLabelClass); } customizeSeries(barChart, chartConfig); return barChart; }  static JFreeChart getBarChart(String chartName); static void getBarChart(String chartName, OutputStream out); static void getBarChartPNG(String chartName, OutputStream out); static byte[] getBarChartAsPNGByteArray(String chartName); static BufferedImage getChartAsBufferedImage(String chartName); static BarChart getBarChartConfigByName(String chartName); static Iterator<BarChart> getChartCollectionIterator(); }
ChartUtils { public static JFreeChart getBarChart(String chartName) throws MarshalException, ValidationException, IOException, SQLException { BarChart chartConfig = null; chartConfig = getBarChartConfigByName(chartName); if (chartConfig == null) { throw new IllegalArgumentException("getBarChart: Invalid chart name."); } DefaultCategoryDataset baseDataSet = buildCategoryDataSet(chartConfig); JFreeChart barChart = createBarChart(chartConfig, baseDataSet); addSubTitles(chartConfig, barChart); String subLabelClass = chartConfig.getSubLabelClass(); if(subLabelClass != null) { addSubLabels(barChart, subLabelClass); } customizeSeries(barChart, chartConfig); return barChart; }  static JFreeChart getBarChart(String chartName); static void getBarChart(String chartName, OutputStream out); static void getBarChartPNG(String chartName, OutputStream out); static byte[] getBarChartAsPNGByteArray(String chartName); static BufferedImage getChartAsBufferedImage(String chartName); static BarChart getBarChartConfigByName(String chartName); static Iterator<BarChart> getChartCollectionIterator();  }