Skip to main content
Pentaho Documentation

Add a chart to your report

Parent article
In the previous exercise, you have seen a small subset of features associated withReport Designer. In this exercise, you will add a chart to your report.

Procedure

  1. Click File Open and find the report you just saved. Click OK.

  2. In the Palette, click and drag a Chart icon (Chart) into the Report Footer band.

  3. Use the resizing handles to center and stretch the chart. You can also adjust the width of the band, as shown in the following example:

    Chart resizing handles
  4. Double-click the sample chart.

  5. The type of chart most appropriate for your report is a pie chart. In the top portion of the Edit Chart dialog box, select the pie chart icon.

    The pie chart properties that define its look and feel are listed in the left pane of the Edit Chart dialog box. Properties associated with the data in the chart are listed in the right pane.
  6. Go to the Title properties. Next to the chart-title property, enter Product Pie Chart.

  7. Under Common in the Primary DataSource tab, click the down arrow next to value-column then click the Ellipsis button to open the Select Field dialog box.

    The value-column specifies the actual values (measures) you want to chart. In this instance, you want to chart the quantity ordered, as shown in the following figure:Select field
  8. Select QUANTITYORDERED from the list and click OK.

  9. Under Series, click the Ellipsis button next to series-by-field to open the Edit Array dialog box.

    Series-by-field specifies the field you are charting. In this instance you are charting by product line. Series are usually placed in the chart legend.
  10. Click the Add icon (Add).

  11. Click in the blank field to expose the drop-down arrow.

  12. Select PRODUCTLINE from the list and click OK.

  13. Click OK to exit the Edit Chart dialog box.

  14. Click the Preview icon (Preview) to display your report.

  15. When the report displays, go to end of the last page to see the following example:

    Displayed report
  16. Save your report.

    If you want to display a bar or line chart instead of a pie chart, use the chart settings, as shown in the following image:

    Chart settings

    You have to add the series-by-value setting manually in the Edit Array dialog box. Click the Add icon Add and type SALES, and then click the Add icon again and type COST. Running the report displays the bar chart, as shown in the following example:Bar chart

    You are now ready to add a parameter to your report.