Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
Table of Contents
3
Table of Figures
5
Figure 84: Defined enumProperty results in Report Studio.............................................. 74
Figure 85: Font Dialog box in Report Studio ................................................................... 75
Figure 86: Color Dialog Box in Report Studio ................................................................. 76
Figure 87: Sample of Parameters in visJSON................................................................... 77
Figure 88: Adding Parameters to the XML ...................................................................... 78
Figure 89: Results in Report Studio .................................................................................. 78
Figure 90: airline shape.json ............................................................................................. 80
6
Introduction
This lab will introduce the participants to the Extensible Visualization capabilities within
IBM Cognos BI 10.2.1 and later releases. A key part of that capability is powered by the
IBM Rapidly Adaptive Visualization Engine (RAVE), and the associated declarative
visualization language, which, for the sake of simplicity, we call visJSON.
At the end of the session, each participant should have a better understanding of the
visualization concepts used in RAVE, and understand how a visualization can be edited
by modifying the specification, included in a “Visualization Bundle” and used within
Report Studio.
The session also introduces the new support for properties/parameters in extensible
visualizations, which helps streamline the report authoring process using RAVE
visualizations.
7
Environment
The following software has been installed and successfully configured in a VMWare
image for this lab exercise:
• IBM Cognos Visualization Customizer, which includes the IBM Rapidly
Adaptive Visualization Engine and sample visualizations
8
Overview
At IBM we have recognized that data visualization is the key to making data more
consumable to end users, exemplified by the popularity of the IBM Many Eyes
application. We have also heard from customers that there are often industry-specific or
company specific visualization requirements that no boxed application has been able to
provide in an extensible way.
To address those needs, IBM Cognos BI 10.2.1 and later releases introduced a capability
described as “Extensible Visualization”. They key objectives were to enable
organizations to extend their BI application with new and unique visualizations at any
time, un-tethered from the BI product delivery schedule, and without having to be experts
in software product development.
9
Visualization “Bundles”
10
Figure 3: Admin Interface for Adding Bundles
11
Figure 5: Report Studio - Using a Visualization
12
The IBM Rapidly Adaptive Visualization Engine
RAVE (the IBM Rapidly Adaptive Visualization Engine) was built to provide IBM
software developers with unmatched flexibility in creating visualizations in their
applications. The visualization engine had to work in various environments (e.g.
web/mobile/desktop), provide developers with the ability to control the visual
presentation and make great looking charts, support interactivity and animation, and be
portable across various applications from IBM.
What sets RAVE apart from other visualization technologies is the declarative language
approach, described in “The Grammar of Graphics” (Wilkinson, 2005). This approach
provides a highly adaptive framework that allows for the creation of customized
visualizations. The visualization description is then interpreted by the RAVE Engine in
the target platform (e.g. Java) and renders the described visualization.
13
The fundamental concept underlying this approach is that visualizations share many
common “features” that can be combined in many ways to create different charts. For
example, axes are common across bar charts, line charts, scatter plots. The RAVE
language enables the visualization creator to declare that the chart has an axis, and the
rendering engine interprets that instruction and draws an axis. Listed below are some
additional common chart features (this is not exhaustive):
The following images show how combining visualization features in different ways can
yield unique, yet understandable visualizations. The first 3 charts show how the “space-
filling tree” or “icicle” layout can be shared across quite different looking visualizations
with categorical data, continuous data, and horizontal or polar structures:
14
Figure 9: Different Visual representations composed using common features
Combining a well-known stacked bar chart layout with the popular treemap layout yields
a new visualization that is new to most users, yet still understandable.
Please note that we are using the term “visJSON” in this document as a short-form for
“visualization description expressed in JSON” – it is not an official name in any respect.
16
Recommended Practices
17
Data in visJSON
Please note that in ordered number lists in RAVE, we use a 0 base. In other words, if you
have 4 categories, they would be listed in the specification as “0, 1, 2, 3”.
In each of the visJSON specs you’ll be using, the data is presented in a javascript array.
A sample of the syntax is as shown below, where there are 2 categories (0 and 1), 5 sub-
categories (0, 1, 2, 3, and 4) and the data values (32, 64, … ):
18
Structure of a RAVE Spec
To understand the parts of a specification, we’ve visualized (we couldn’t help ourselves)
the structure of the two very different visualizations.
19
Figure 15: Sample Chart 2
20
Main Regions of a Typical Chart
Version Information
21
Creating Visualizations Using RAVE
Please Note: This entire lab is built around a VMWare image. If you are unfamiliar with
VMWare, please consult one of the instructors.
a) Start the VMWare image associated with this lab – please consult with an
instructor for details.
b) The image is set up for auto-login. You should get logged in once the image
starts up.
c) It is recommended that once the image is up and running, you go into Full screen
by pressing CTRL + ALT + Enter. You can press these same keys again to
return to the default view.
Note: Once you are in the image in Full screen, the rest of the
instructions/exercises will be easier to follow.
22
Launching IBM Cognos Visualization Customizer
Once the VMWare image is full-screen, you should see the VM “desktop”.
a) Open “Notepad” in the Start/All Programs/Accessories location in Windows.
Notepad will be helpful during exercises for copying and pasting.
b) Locate the “visBundler” icon on the desktop.
c) Double-click on the icon to launch the application.
d) Adjust the widths of the Preview and Editing panes as needed by dragging the
center divider.
23
Exercise 1: Hello RAVE
In the exercises outlined below, the intention is to introduce a number of core concepts
and help you gain familiarity with the visJSON language used in RAVE.
In the “File” menu of visBundler, you’ll see an option to “Open VisJSON File…”. It’s
important during the exercises that you use this option in the file menu rather than
“Open…”. The “Open…” option looks for complete bundles which are .zip files. IN the
exercises today you’ll be looking for .json files which are RAVE specifications. As a
result, if you use “Open” you won’t see any of the files listed in the exercises.
.
a) Use File/Open visJSON to open “HelloRave.json”. For this session, you’ll find
all samples in the c:Samples directories or in one of the subdirectories (the
subdirectory will be called out in the exercise when that is the case).
b) Answer the questions below before clicking on the Draw Chart button
24
25
Understanding Data
26
Figure 21: Sample Data section in visJSON
27
Coordinates and Axes
The grammar defines a Coordinates System – an area into which data will be plotted.
These come in different forms:
28
Figure 25: Axes Defaults
29
Figure 26: Sample visJSON for an Axis
30
Titles
31
Figure 29: Sample Axis visJSON
32
Figure 31: Change Palette Feature
33
Labels on Elements
Symbols as Elements
36
Figure 37: Tag Cloud Sample
37
Legends
Legends Overview
38
Exercise 5A: Legends
39
Exercise 5B: Continuous Legends
40
Sizes
Visualization Size
Specifying Sizes
41
Exercise 6: Sizes
42
Style and Colors
Style - Padding
43
Style – Solid “fill” Options
Named Colors
44
RGB Colors
45
HSL and HSV Colors
46
Fill – Linear Gradients
47
Figure 50: visJSON Gradient fill with hsv lightness
48
Radial Gradients
49
Figure 53: visJSON for Radial Gradient
50
Style Options – “stroke”
51
Exercise 7: Style and Color
52
Aesthetics
53
Palettes and Aesthetics
54
Using “styleBy” for Aesthetics
Mapping
55
Explicit Mapping
56
Size Aesthetics
Color Aesthetics
57
Non-Categorical Color Aesthetics
58
Technique: Change Transparency but not Color
Symmetric Upper/Lower
59
Mapping “visibility”
Aesthetics Availability
60
Exercise 8: Aesthetics
61
Templates and Parameters
62
RAVE Templates
63
Figure 67: Parameter Attributes - label, description, defaultValue
64
Figure 69: Parameter Attributes - resolution
65
Figure 71: xpath Syntax
66
Figure 74: Resolution - Method Example
67
Figure 76: Resolution - SourceValue Example
68
Figure 78: Resolution - SourcePath Example
69
Figure 80: Parameters Attributes - resolveOrder
Parameter Values
70
Figure 81: Parameter Values
71
Figure 83: Parameter Values - id, value
72
73
Figure 84: Defined enumProperty results in Report Studio
74
RAVE font Datatype
75
RAVE Color Datatype
76
Workflow for Adding Parameters
77
Figure 88: Adding Parameters to the XML
78
RAVE Palette Datatype
79
Exercise 9: Adding a Parameter
80
We Value Your Feedback!
• Don’t forget to submit your Insight session and speaker feedback! Your feedback
is very important to us – we use it to continually improve the conference.
• Access the Insight Conference Connect tool to quickly submit your surveys from
your smartphone, laptop or conference kiosk.
81
Acknowledgements and Disclaimers
Availability. References in this presentation to IBM products, programs, or services do not imply
that they will be available in all countries in which IBM operates.
The workshops, sessions and materials have been prepared by IBM or the session speakers and
reflect their own views. They are provided for informational purposes only, and are neither
intended to, nor shall have the effect of being, legal or other guidance or advice to any participant.
While efforts were made to verify the completeness and accuracy of the information contained in
this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shall
not be responsible for any damages arising out of the use of, or otherwise related to, this
presentation or any other materials. Nothing contained in this presentation is intended to, nor
shall have the effect of, creating any warranties or representations from IBM or its suppliers or
licensors, or altering the terms and conditions of the applicable license agreement governing the
use of IBM software.
All customer examples described are presented as illustrations of how those customers have
used IBM products and the results they may have achieved. Actual environmental costs and
performance characteristics may vary by customer. Nothing contained in these materials is
intended to, nor shall have the effect of, stating or implying that any activities undertaken by you
will result in any specific sales, revenue growth or other results.
82