Pentaho 1.0 Chart Expression XML Examples

Pie Chart Example

<expression class="org.pentaho.jfree.reportcharts.PieChartExpression" name="PieChart">
 <properties>
  <property name="dataSource">chartDataSource</property><!—Set Data Collector -->
  <property name="title">RegionDepartmentChartTitle</property>
  <property name="titleFont">Arial-BOLD-14</property>><!--fontfamilyname-style-pointsize-->
    <property name="labelFont">Arial--8</property>
    <property name="legendFont">Arial--6</property>
    <property name="backgroundColor">#DDDDDD</property>
    <property name="showBorder">true</property>
    <property name="legendLocation">BOTTOM</property>
    <property name="showLegend">true</property>
    <property name="chartWidth">500</property>
    <property name="chartHeight">400</property>
    <property name="useDrawable">false</property>
    <property name="ignoreNulls">true</property>
    <property name="ignoreZeros">true</property>
    <property name="pieLabelFormat">{2}</property>
    <property name="pieLegendLabelFormat">{0}</property>
    <property name="explodeSegment">maxValue</property>
    <property name="explodePct">.20</property>
  </properties>
</expression>

Bar Chart Example

<expression class="org.pentaho.jfree.reportcharts.BarChartExpression" name="BarChart">
 <properties>
  <property name="dataSource">chartDataSource</property><!—Set Data Collector -->
  <property name="title">Sales By Customer</property>
  <property name="titleFont">Arial-BOLD-9</property><!--fontfamilyname-style-pointsize -->
  <property name="labelFont">Arial--9</property>
  <property name="legendFont">Arial--6</property>
  <property name="backgroundColor">white</property>
  <property name="showBorder">false</property>
  <property name="horizontal">true</property>
  <property name="drawBarOutline">true</property>
  <property name="seriesColor[0]">#2954A9</property>
  <property name="legendLocation">BOTTOM</property>
  <property name="showLegend">false</property>
  <property name="maxBarWidth">0.10</property>
  <property name="maxCategoryLabelWidthRatio">7.0</property>
  <property name="chartHeight">600</property>
  <property name="chartWidth">480</property>
  <property name="useDrawable">true</property>
 </properties>
</expression>