Integrating New Visualizations with Pentaho Using the Viz API Nick Keune, Pentaho Embedded & Advanced Analytics SE, Hitachi Vantara Ben Hopkins Pentaho Senior Product Manager, Hitachi Vantara
Agenda In this session, we will cover: • Overview of the new Viz API, and how it enables new chart integration and reusability • How it has been improved and why it is valuable for developers • Technical deep dive and demo of visualization integration examples
Viz API Overview
What is the Visualization API? • Viz API 3.0 is a layer that allows Analyzer, CTools, and Data Explorer (PDI) to use visualizations in a unified, pluggable way • Built on top of other Platform JavaScript APIs that ensure seamless data access and provide visualizations with validation, theming, and other features • In Viz API, each visualization is constituted by: – Model (s), which identifies the visualization and defines it in terms of its data requirements (such as bar size, category, measure) – View (s), which implements the actual rendering using chosen technologies (e.g. HTML, SVG, D3), and handle user interaction and other actions
Viz API Diagram “Containers” Analyzer CDF/CDE DE (PDI) Configurations Viz Framework 3.0 (File) Visualizations Pentaho OOB D3 Fusion Charts and others… (CCC) (Libraries shown)
Why Does It Matter to Pentaho Customers? • Easier to integrate 3 rd party visualizations and develop your own charts • Visualizations, styles, and configurations are reusable across Analyzer, CTools, PDI Viz API 3.0
Why Does It Matter to Pentaho Customers? • In 7.1, Pentaho defined a new global look and feel for default charts using Viz API 3.0 New Legend, Fonts • Applies to Analyzer, +Scrolling CTools, and PDI New Color Palette
What’s New and Improved for Developers? • Clear separation between what Visualization controls vs. what Container controls – less hacking Analyzer! • Usage of Maven for packaging makes it possible to manage content and dependencies in an automated fashion as you develop • Easier to test and validate everything is working – before deploying the visualization to Pentaho live • More complete documentation and SDK with samples you can download – including D3 bar chart integration tutorial • …but note Viz API 3.0 is still a ‘beta,’ meaning it may change in a future release
Example Use Case – Healthcare • Organization: Cancer center of large health research institute • Problem: Needed specific chart for proper analysis across patient groups, better supporting precision medicine • Solution: CTools dashboard with custom Viz API chart that calls PDI endpoints • Benefits: New visualization for PoC developed in a few days
Context – What Role Does the Visualization API Play?
Running and Supporting Custom Visualizations Authenticate Interactive Figure 2: Functional considerations for Production Visuals on a web page Authorize Web Page Query HTML Web Data Rendering Dataset Data (json) Server Source Java Script Blending/Federation Authentication/Authorization Binding Data to HTML Quality/Validation Logging, Auditing, Versioning Registering Actions Data Orchestration Caching, Multitenancy, Scaling Styling Classes
Your Custom Visualizations, Pentaho’s Platform Focus on the design and behavior of your custom visual, trust in Pentaho to streamline the data, application, server and object considerations.
Demo Code; Results
Ability of Viz 3.0 API Capabilities • Makes a “First Class Object” inside DE, PAZ, CDE; just like ootb Charts – Does all this with native HTML5 elements, directly in DOM (not via <iframe>) • Integrate with Pentaho data backend, user context, visual presentation • Hooks to shared globalization, localization, branding configurations • Dynamic data bindings, Robust presentation logic, Packaged server side • Events bubble through the existing contract: Analyzer API gets view.action
Ability of Viz 3.0 API Considerations • MVC framework • API requirements – base object inheritance • Dependency on RequireJS • Driven by structure of data, which can vary between CDE & PAZ/DE • In future may extend the Data API (so it can do post query data manipulation via API methods)
Summary What we covered today: • Overview of the new Viz API, and how it enables new chart integration and reusability • How it has been improved and why it is valuable for developers • Technical deep dive and demo of visualization integration examples
Next Steps Want to learn more? • Viz API tutorial and sample for download – github page titled “Visualization API” – pentaho.github.io/pentaho-platform-plugin-common-ui/platform/visual/ • Viz API Detailed documentation – doc page titled “Visualization API” – help.pentaho.com/Documentation/7.1/0R0/070/javascript-apis/platform/pentaho.visual • PentahoWorld Session: “Hands-on Training: Creating Responsive Dashboard Layouts with Ctools” • PentahoWorld Session: “Dev-by-Dev: Using the 8.0 Visualization API to Create Custom Visualizations”
Recommend
More recommend