This documentation targets the API shipped with Pentaho 7.1. Click here for the updated version shipped with Pentaho 8.3.

Overview

As of version 7.1, the Pentaho platform ships with a new, beta version of the Visualization API, side-by-side with the previous version. This documentation relates to the new version.

The Visualization API provides a unified way to visualize data across the Pentaho suite (e.g. Analyzer, PDI, CDF).

Essentially, it is a set of abstractions that enables safe, isolated operation between applications, visualizations and business logic.

The Visualization API is built on top of other Platform JavaScript APIs:

A set of stock visualizations is included, covering the most common chart types. Based on the CCC charting library, they’re customizable and extensible to fit your organization’s desired look and feel.

If you want to know more about the specifics of how Analyzer exposes the Visualization API, read Analyzer and the Visualization API.

The following sections will guide you through the complete process of creating a custom visualization for the Pentaho platform, from developing it, to deploying it to Pentaho products and to configuring it.

Creating a visualization

Creating a visualization boils down to creating:

The Create a Custom Visualization walk-through shows you how to develop these and how to create an OSGi artifact containing the visualization, so that it can be deployed to a Pentaho product.

Fast-lane

If you prefer, you can skip the walk-through and get the final Pentaho Web Project, and build it. First make sure that you have git and maven 3+ installed and that this settings.xml is in your USER_HOME/.m2 directory.

# Clone the repository.
git clone https://github.com/pentaho/pentaho-engineering-samples
cd pentaho-engineering-samples
git checkout -b 7.1

# Go to the sample's directory.
cd Samples_for_Extending_Pentaho/javascript-apis/platform/pentaho/visual/samples/bar-d3-bundle

# Build the Web Project
mvn package

Deploying the visualization

To deploy the visualization to a Pentaho product (Pentaho Server or PDI), copy the KAR file you just built (located at assemblies/target) into its system/karaf/deploy folder. See OSGi Artifacts Deployment if you need more information.

If everything went well, you should now see your visualization being offered in Analyzer and PDI, as well as be able to use it in a CDE dashboard:

  1. Your Bar/D3 visualization in Analyzer:

    Bar/D3 in Analyzer

  2. Your Bar/D3 visualization in the PDI menu:

    Bar/D3 in PDI - menu

  3. Your Bar/D3 visualization in PDI:

    Bar/D3 in PDI

  4. Your Bar/D3 visualization in CDE:

    You can get the following dashboard from the https://github.com/pentaho/pentaho-engineering-samples repository, 7.1 branch, at the location: Samples_for_Extending_Pentaho/javascript-apis/platform/pentaho/visual/samples/bar-d3-cde.

    Bar/D3 in CDE

Configuring the visualization

A visualization can be configured by third-parties using configuration rules in external configuration files. These configurations are merged with any default configuration that is included with the visualization.

See Configuring a Visualization for more details.