Pentaho 1.6 and Later Chart Expression XML Examples

Time Series Line Chart Using XYLineChartExpression and the TimeSeriesCollectorFunction

    <expression class="org.pentaho.plugin.jfreereport.reportcharts.XYLineChartExpression" name="TimeSeriesChart">
      <properties>
        <!--  
          Font specification: fontfamilyname-style-pointsize
          e.g. Arial-BOLD-14
          Style can be BOLD, BOLDITALIC, or ITALIC        
         -->
        <property name="title">Product Lines</property>
	<property name="threeD">true</property>
        <property name="titleFont">Arial-BOLD-14</property>
        <property name="labelFont">Arial--8</property>
        <property name="legendFont">Arial--6</property>
        <property name="backgroundColor">#FFFFFF</property>
        <property name="showBorder">true</property>
        <property name="horizontal">false</property>
        <property name="dataSource">chartDataSource</property>
        <property name="legendLocation">BOTTOM</property>
	<property name="showLegend">true</property>
	<property name="chartHeight">400</property>
        <property name="chartWidth">600</property>
	<property name="useDrawable">true</property>
	<property name="markersVisible">true</property>
	<property name="domainVerticalTickLabels">true</property>
	<property name="rangeMinimum">0</property>
	<property name="rangeMaximum">70000</property>
	<property name="rangeTitle">Sold Price</property>
	<property name="domainTitle">Time</property>
	<property name="seriesColor[0]">#EE7733</property>
	<property name="seriesColor[1]">#9EAA36</property>
	<property name="seriesColor[2]">#BF0000</property>
	<property name="seriesColor[3]">#FCCF12</property>
	<property name="seriesColor[4]">#772200</property>
	<property name="seriesColor[5]">#DDCC88</property>
	<property name="seriesColor[6]">#123D82</property>
	<property name="seriesColor[7]">#4A0866</property>
	<property name="seriesColor[8]">#445500</property>
	<property name="seriesColor[9]">#FFAA00</property>
	<property name="seriesColor[10]">#1E8AD3</property>
	<property name="seriesColor[11]">#AA6611</property>
	<property name="seriesColor[12]">#772200</property>
      </properties>
    </expression>

Scatter Plot Chart Using the ScatterPlotChartExpression and an XYSeriesCollectorFunction

    <expression class="org.pentaho.plugin.jfreereport.reportcharts.ScatterPlotChartExpression" name="DotChart">
      <properties>
        <!--  
          Font specification: fontfamilyname-style-pointsize
          e.g. Arial-BOLD-14
          Style can be BOLD, BOLDITALIC, or ITALIC        
         -->
	<property name="title">Scatterplot Grouped Chart Example</property>
	<property name="threeD">true</property>
        <property name="titleFont">Arial-BOLD-14</property>
        <property name="labelFont">Arial--8</property>
        <property name="legendFont">Arial--6</property>
        <property name="backgroundColor">#9EAA36</property>
        <property name="showBorder">true</property>
        <property name="horizontal">false</property>
        <property name="dataSource">scatterChartDataSource</property>
	<property name="seriesColor[0]">#EE7733</property>
	<property name="seriesColor[1]">#9EAA36</property>
	<property name="seriesColor[2]">#BF0000</property>
	<property name="seriesColor[3]">#FCCF12</property>
	<property name="seriesColor[4]">#772200</property>
	<property name="seriesColor[5]">#DDCC88</property>
	<property name="seriesColor[6]">#123D82</property>
	<property name="seriesColor[7]">#4A0866</property>
	<property name="seriesColor[8]">#445500</property>
	<property name="seriesColor[9]">#FFAA00</property>
	<property name="seriesColor[10]">#1E8AD3</property>
	<property name="seriesColor[11]">#AA6611</property>
	h2. <property name="seriesColor[12]">#772200</property>
        <property name="legendLocation">BOTTOM</property>
	<property name="showLegend">true</property>
	<property name="chartHeight">400</property>
        <property name="chartWidth">600</property>
	<property name="useDrawable">true</property>
	<property name="domainStickyZero">false</property>
	<property name="domainIncludesZero">false</property>
	<property name="rangeStickyZero">false</property>
	<property name="rangeIncludesZero">false</property>
	<property name="domainTitle">MSRP</property>
	<property name="rangeTitle">Buy Price</property>
	<property name="dotHeight">20</property>
	<property name="dotWidth">20</property>
      </properties>
    </expression>

Bubble Chart using the BubbleChartExpression and XYZSeriesCollectorFunction

    <expression class="org.pentaho.plugin.jfreereport.reportcharts.BubbleChartExpression" name="BubbleChart" depLevel="1">
      <properties>
        <!--  
          Font specification: fontfamilyname-style-pointsize
          e.g. Arial-BOLD-14
          Style can be BOLD, BOLDITALIC, or ITALIC        
         -->
		<property name="threeD">true</property>
        <property name="titleFont">Arial-BOLD-14</property>
        <property name="labelFont">Arial--8</property>
        <property name="legendFont">Arial--6</property>
        <property name="backgroundColor">#9EAA36</property>
        <property name="showBorder">true</property>
        <property name="horizontal">false</property>
        <property name="dataSource">chartDataSource</property>
	<property name="seriesColor[0]">#EE7733</property>
	<property name="seriesColor[1]">#9EAA36</property>
	<property name="seriesColor[2]">#BF0000</property>
	<property name="seriesColor[3]">#FCCF12</property>
	<property name="seriesColor[4]">#772200</property>
	<property name="seriesColor[5]">#DDCC88</property>
	<property name="seriesColor[6]">#123D82</property>
	<property name="seriesColor[7]">#4A0866</property>
	<property name="seriesColor[8]">#445500</property>
	<property name="seriesColor[9]">#FFAA00</property>
	<property name="seriesColor[10]">#1E8AD3</property>
	<property name="seriesColor[11]">#AA6611</property>
	<property name="seriesColor[12]">#772200</property>
        <property name="legendLocation">BOTTOM</property>
	<property name="showLegend">true</property>
	<property name="chartHeight">400</property>
        <property name="chartWidth">600</property>
	<property name="useDrawable">true</property>
	<property name="domainStickyZero">false</property>
	<property name="domainIncludesZero">false</property>
	<property name="rangeStickyZero">false</property>
	<property name="rangeIncludesZero">false</property>
	<property name="domainTitle">Actual</property>
	<property name="rangeTitle">Budget</property>
	<property name="maxBubbleSize">90</property>
	<property name="rangeMinimum">5000000</property>
	<property name="domainMinimum">5000000</property>
	<property name="domainMaximum">15000000</property>
      </properties>
    </expression>