1 13 package org.pentaho.plugin.jfreereport.reportcharts; 14 15 import org.jfree.chart.ChartFactory; 16 import org.jfree.chart.JFreeChart; 17 import org.jfree.chart.plot.PlotOrientation; 18 import org.jfree.data.category.CategoryDataset; 19 import org.pentaho.core.session.IPentahoSession; 20 21 public class LineChartExpression extends CategoricalChartExpression { 22 23 private static final long serialVersionUID = 816438776025760907L; 24 25 public LineChartExpression() { 26 super(); 27 } 28 29 public LineChartExpression(IPentahoSession session) { 30 super(session); 31 } 33 34 public JFreeChart getChart(CategoryDataset categoryDataset) { 35 JFreeChart rtn = null; 36 if (isThreeD()) { 37 rtn = ChartFactory.createLineChart3D(getTitle(), getCategoryAxisLabel(), getValueAxisLabel(), categoryDataset, isHorizontal() ? PlotOrientation.HORIZONTAL : PlotOrientation.VERTICAL, isShowLegend(), false, false); 38 } else { 39 rtn = ChartFactory.createLineChart(getTitle(), getCategoryAxisLabel(), getValueAxisLabel(), categoryDataset, isHorizontal() ? PlotOrientation.HORIZONTAL : PlotOrientation.VERTICAL, isShowLegend(), false, false); 40 } 41 return rtn; 42 } 43 44 } 45 | Popular Tags |