These examples apply to 1.1 and later of Pentaho.
Line, Bar, and Area Chart Data Collector Example
Code Block |
---|
xml{<expression class | "org.pentaho.plugin.jfreereport.reportcharts.CategorySetCollectorFunction" name="chartDataSource"> <properties> <property name="categoryColumn">CUSTOMERNAME</property> <property name="seriesName[0]">Customer Sales</property> <property name="seriesName[1]">Customer Margin</property> <!-- <property name="seriesName[n]">Series Name</property> --> <property name="valueColumn[0]">Total Sales</property> <property name="valueColumn[1]">Margin</property> <!-- <property name="valueColumn[n]">Column Name</property> --> <property name="summaryOnly">false</property> <!-- <property name="group">Customer_Type</property> --><!-- Only use if summaryOnly=true --> </properties></expression>{code} h2. Pie Chart Data Collector{code:xml |
---|
|
<expression class="org.pentaho.plugin.jfreereport.reportcharts.PieSetCollectorFunction" name="ChartDataSource">
<properties>
<property name="group">RegionGroup</property><!-- Only use if summaryOnly=true -->
<property name="seriesColumn">REGION</property>
<property name="valueColumn">RegionBudget</property>
<property name="summaryOnly">true</property>
</properties>
</expression>
|