6 min read

Ring chart

The ring chart is identical to the pie chart, except that it renders as a ring versus a complete pie. In addition to sharing all the properties similar to the pie chart, it also defines the following rendering property Pentaho Reporting 3.5 for Java Developers  :

Options Property Group

Property name

Description

section-depth

This property defines the percentage of the radius to render the section as. The default value is set to 0.5.

Ring chart example

For this example, simply open the defined pie chart example and select the Ring chart type. Also, set the section-depth to 0.1, in order to generate the following effect:

Pentaho Reporting 3.5 for Java Developers

Multi pie chart

The multi pie chart renders a group of pie charts, based on a category dataset. This meta-chart renders individual series data as a pie chart, each broken into individual categories within the individual pie charts. The multi pie chart utilizes the common properties defined above, including the category dataset properties. In addition to the standard set of properties, it also defines the following two properties:

Options Property Group

Property name

Description

label-format

This label defines how each item within a chart is rendered. The default value is set to “{0}”. The format string may also contain any of the following:

  • {0}: To render the item name
  • {1}: To render the item value
  • {2}: To render the item percentage in relation to the entire pie chart

by-row

This value defaults to True. If set to False, the series and category fields are reversed, and individual charts render series information.

Note that the horizontal, series-color, stacked and stacked-percent properties do not apply to this chart type.

Multi pie chart example

This example demonstrates the distribution of purchased item types, based on payment type. To begin, create a new report. You’ll reuse the bar chart’s SQL query. Now, place a new Chart element into the Report Header. Edit the chart, selecting Multi Pie Pentaho Reporting 3.5 for Java Developers  as the chart type.

To configure the dataset for this chart, select ITEMCATEGORY as the category-column. Set the value-columns property to QUANTITY and the series-by-field to PAYMENTTYPE.

Pentaho Reporting 3.5 for Java Developers

Waterfall chart

The waterfall chart displays a unique stacked bar chart that spans categories. This chart is useful when comparing categories to one another. The last category in a waterfall chart normally equals the total of all the other categories to render appropriately, but this is based on the dataset, not the chart rendering. The waterfall chart utilizes the common properties defined above, including the category dataset properties. The stacked property is not available for this chart. There are no additional properties defined for the waterfall chart.

Waterfall chart example

In this example, you’ll compare by type, the quantity of items in your inventory. Normally, the last category would be used to display the total values. The chart will render the data provided with or without a summary series, so you’ll just use the example SQL query from the bar chart example. Add a Chart element to the Report Header and select Waterfall Pentaho Reporting 3.5 for Java Developers as the chart type.

Set the category-column to ITEMCATEGORY, the value-columns to QUANTITY, and the series-by-value property to Quantity. Now, apply your changes and preview the results.

Pentaho Reporting 3.5 for Java Developers

Bar line chart

The bar line chart combines the bar and line charts, allowing visualization of trends with categories, along with comparisons. The bar line chart is unique in that it requires two category datasets to populate the chart. The first dataset populates the bar chart, and the second dataset populates the line chart. The bar line chart utilizes the common properties defined above, including the category dataset properties. This chart also inherits the properties from both the bar chart, as well as the line chart. This chart also has certain additional properties, which are listed in the following table:

Required Property Group

Property name

Description

bar-data-source

The name of the first dataset required by the bar line chart, which populates the bars in the chart. This value is automatically populated with the correct name.

line-data-source

The name of the second dataset required by the bar line chart, which populates the lines in the chart. This value is automatically populated with the correct name.

Bar Options Property Group

Property name

Description

ctgry-tick-font

Defines the Java font that renders the Categories.

Line Options Property Group

Property name

Description

line-series-color

Defines the color in which to render each line series.

line-tick-fmt

Specifies the Java DecimalFormat string for rendering the Line Axis Labels

lines-label-font

Defines the Java font to use when rendering line labels.

line-tick-font

Defines the Java font to use when rendering the Line Axis Labels.

As part of the bar line chart, a second y-axis is defined for the lines. The property group Y2-Axis is available with similar properties as the standard y-axis.

Bar line chart example

To demonstrate the bar line chart, you’ll reuse the SQL query from the area chart example. Create a new report, and add a Chart element to the Report Header. Edit the chart, and select Bar Line Pentaho Reporting 3.5 for Java Developers  as the chart type.

You’ll begin by configuring the first dataset. Set the category-column to ITEMCATEGORY, the value-columns to COST, and the series-by-value property to Cost. To configure the second dataset, set the category-column to ITEMCATEGORY, the value-columns to SALEPRICE, and the series-by-value property to Sale Price. Set the x-axis-label-width to 2.0, and reduce the x-font size to 7. Also, set show-legend to True.

You’re now ready to preview the bar line chart.

Pentaho Reporting 3.5 for Java Developers

Bubble chart

The bubble chart allows you to view three dimensions of data. The first two dimensions are your traditional X and Y dimensions, also known as domain and range. The third dimension is expressed by the size of the individual bubbles rendered. The bubble chart utilizes the common properties defined above, including the XY series dataset properties. The bubble chart also defines the following properties:

Options Property Group

Property name

Description

max-bubble-size

This value defines the diameter of the largest bubble to render. All other bubble sizes are relative to the maximum bubble size. The default value is 0, so this value must be set to a reasonable value for rendering of bubbles to take place. Note that this value is based on pixels, not the domain or range values.

The bubble chart defines the following additional dataset property:

Required Property Group

Property name

Description

z-value-columns

This is the data source column to use for Z value, which specifies the bubble diameter relative to the maximum bubble size.

Bubble chart example

In this example, you need to define a three dimensional SQL query to populate the chart. You’ll use inventory information, and calculate Item Category Margin:

SELECT
"INVENTORY"."ITEMCATEGORY",
"INVENTORY"."ONHAND",
"INVENTORY"."ONORDER",
"INVENTORY"."COST",
"INVENTORY"."SALEPRICE",
"INVENTORY"."SALEPRICE" - "INVENTORY"."COST" MARGIN
FROM
"INVENTORY"
ORDER BY
"INVENTORY"."ITEMCATEGORY" ASC

Now that you have a SQL query to work with, add a Chart element to the Report Header and select Bubble Pentaho Reporting 3.5 for Java Developers  as the chart type. First, you’ll populate the correct dataset fields. Set the series-by-field property to ITEMCATEGORY. Now, set the X, Y, and Z value columns to ONHAND, SALEPRICE, and MARGIN.

You’re now ready to customize the chart rendering. Set the x-title to On Hand, the y-title to Sales Price, the max-bubble-size to 100, and the show-legend property to True. The final result should look like this:

Pentaho Reporting 3.5 for Java Developers

LEAVE A REPLY

Please enter your comment!
Please enter your name here