These examples apply to 1.1 and later of Pentaho.
Line, Bar, and Area Chart Data Collector Example
Code Block |
---|
|
<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>
|
Pie Chart Data Collector
Code Block |
---|
|
<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>
|