KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > plugin > jfreereport > reportcharts > RingChartExpression


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12 */

13 package org.pentaho.plugin.jfreereport.reportcharts;
14
15 import org.jfree.chart.ChartFactory;
16 import org.jfree.chart.JFreeChart;
17 import org.jfree.data.general.PieDataset;
18 import org.pentaho.core.session.IPentahoSession;
19
20 public class RingChartExpression extends PieChartExpression {
21
22     private static final long serialVersionUID = 8157232155813173422L;
23
24   public RingChartExpression() {
25     super();
26   }
27   
28   protected RingChartExpression(IPentahoSession session) {
29         super(session);
30     }
31
32     public JFreeChart getChart(PieDataset pieDataset) {
33         pieDS = pieDataset;
34         JFreeChart rtn = null;
35         rtn = ChartFactory.createRingChart(getTitle(), pieDataset, isShowLegend(), false, false);
36
37         return rtn;
38     }
39
40 }
41
Popular Tags