Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

Create a chart

Parent article

Within a dashboard, you can present data visually with bar, pie, line, dial, and area charts. To create a chart, first use the Query Editor to select a data source on which the chart is based. After defining the data source, use the Chart Designer to create a chart that presents the data in the dashboard. The following tutorials include the basic steps for creating a dashboard chart.

Use Query Editor

To create a chart, you must first choose a data source, which contains the data you want displayed in your chart.

Follow these basic steps to define data with the Query Editor using a sample dashboard provided with the Pentaho User Console (PUC).

Procedure

  1. In PUC, click Browse Files and navigate to Public Steel Wheels. Locate the Sales Performance (dashboard) and double-click to open it.

  2. Click the Edit Content icon to edit the dashboard.

  3. In the dashboard, find the Orders by Country panel and click the Insert Content icon. In the drop-down menu that displays, select Chart.

    locations of dashboard and Query         Editor icons
  4. Click OK to discard the current content.

    The Select a Data Source dialog box appears.
  5. Select the data source Orders from the list of available choices and click OK.

    The data source contains the content you want to display in your chart. The Query Editor appears. You can use the Query Editor to retrieve dynamic data from a database for display in a chart. Defining your query is the first step in ensuring that the correct data is selected.
  6. In the Query Editor, click the Plus Sign next to a category name to expand its associated table columns.

  7. Click the small right arrow beside Selected Columns to place Territory under Selected Columns.

    In the example below, the Territory column has been selected (shaded in red) and added to Selected Columns. Select columns in Query         EditorNotice that the Column names appear under Selected Columns.
  8. Continue by adding Total in the Orders category to the Selected Columns.

  9. Click Preview to see an example table of the data.

    Query Editor        previewWhen finished, click Close to exit the preview.
  10. Click OK when you have finished defining the data.

    The Chart Designer appears.

Next steps

You are now ready to proceed with the tutorial steps in Use Chart Designer

Use Chart Designer

After defining the data for the new chart with the Query Editor, you are ready to create the visual layout for the chart using the Chart Designer.

This part of the tutorial assumes you have followed the steps in Use Query Editor to define the data for the examples shown in the following steps

Procedure

  1. In Chart Designer, under Data, click the drop-down arrow to display the data selection menu:

    Data panel
    Data FieldDescription
    Series ColumnSeries display as the individual columns on a bar chart and as individual lines in a line chart. Area charts display each series as a point.
    Category ColumnCategories display as bars or groups of bars on the x-axis (horizontal axis). In line charts, categories are usually associated with time periods. In area charts, the x-axis displays the category labels. If you do not want to display categories, choose None.
    Values ColumnThe value determines the height of columns in a bar chart and the height of lines in a line chart. In area charts, the y-axis values determine the heights of the points. The value is always numeric.
    A preview of the chart appears in a box in the upper-right corner of the Chart Designer as you select your options. Chart designer preview
  2. Under Chart Type, click the type of chart applicable for your data. If you are unsure which chart type is best for displaying your data, see Chart types for more information. In this tutorial, Bar Chart is selected.

    By default, pie and dial charts display in animated Flash mode. You can turn animation off by disabling the Animated check box in the Chart Designer. Animated charts can highlight key data points. For example, you may want to apply animation if a data point reaches a critical value, such as high or low sales numbers. If you selected a pie or dial chart, see Pie charts or Dial charts.
  3. Under Theme, select a theme from the list. In this tutorial, the Default theme is selected.

    The theme is applied to your chart.
  4. Enter the labels for the Chart Title, X Axis Title (horizontal axis), and Y Axis Title (vertical axis).

    Entries appear in the chart preview. Chart preview x and y axis
  5. Click Apply to see the chart preview.

  6. Click OK to display your chart in the dashboard panel.

Results

The revised chart now appears in the dashboard.

Chart types

The following guidelines may help you determine which chart type is best suited for the data you want to present in your dashboard:

Bar charts

If you want to compare items during a specific time period, consider using a bar chart. Key words to think about when creating a bar chart are compare or rank. For example if you want to compare items sold to show which one made the most profit, you might create a bar chart that ranks the products from the lowest to highest profit. The bar's length determines its ranking; the label identifies the item. Bar chart data can be presented horizontally or vertically depending on your requirements.

Pie charts

If you are comparing parts of a whole, consider using a pie chart, which gives dashboard consumers an immediate visual clue of the relative sizes of the shares of a whole. Key words associated with charts include, portion, share, and percentage. For example, if you want to demonstrate the proportion of the company's budget spent on health insurance, use a pie chart. Categories are represented by individual slices. To make the chart easier to read, limit the number of slices to five. The size of the slice in a pie chart is determined by the value as shown in the following example: Pie chart

You can animate a pie chart if you want its pieces to be exploded, which means that the individual slices of the pie can be pulled away from the rest of the pie. Exploded pie chart

To animate a pie, enable Animated check box in the Chart Designer.

Line charts

Line charts are useful for showing changes over time. Key words associated with data that is best suited for a line chart are trend, growth, and decline. If, for example, you want to show how product sales have changed over five years, use a line chart. The slope of the line helps users quickly identify the direction of the trend.

Dial charts

Dial charts are often associated with Key Performance Indicators (KPIs). Dial charts are circular and contain a scale, a needle, and one or more a dial sectors. The dial sector is used to identify a specified area on a dial chart using a particular color. For example, you could have a dial plotting inventory with a minimum dial value of 10000 and a maximum dial value of 50000. There could be a red dial sector for the region between 2000 and 4000 indicating that if the needle is in this area, there is a danger of a supply inventory shortage.

For dial charts to display correctly, you must enter values for your range and the chart title. In the example below, the dial chart preview is displaying ranges associated with sales. Notice that each dial sector is represented by a color, red, yellow, or green. The needle is positioned in the 220796.48 range, indicating that total orders, while not stellar, are not near the danger zone indicated by the red sector in the dial. Dial chart

You can change the color of a dial sector by clicking the small down arrow in the color boxes associated with Range. Select a color from the palette so that you can preview it on your dial chart. Click Apply to preview your dial chart. Click OK to place your dial chart into the dashboard. Color picker

Area charts

Area charts can be used to show a comparison of the same thing during different points in time. Area charts are not designed to provide exact data but they do give users visual clues of the relative sizes of the items they are representing.

Modifying charts

After creating a chart, you can perform any of the following modifications:

  • Edit a chart
  • Correct scaling issues
  • Rotate chart axis labels

Learn more