Search This Blog

Showing posts with label CTools. Show all posts
Showing posts with label CTools. Show all posts

Wednesday, February 20, 2013

Customizing the bullet graph in Ctools on Pentaho BI Server Community Edition

Continuing on my posts on Executive dashboards and Open source BI platform (specifically Pentaho), I would like to start with perhaps the most important graph component to start off an executive dashboard in my opinion - bullet graph. Conceived by Stephen Few in now a famous specification, bullet graphs get to the point without unnecessary frills.

In my previous post, we had started building a BI dashboard using a 3 column layout using the Pentaho BI Server. Luckily, out of the box bullet graphs in Pentaho community edition are already very compelling. In this post, we will customize the Bullet graph to match the ideal look and feel that I wanted for the dashboard utilizing customizations that are not that widely known.

Here is what I want my final bullet graph to look like.


We will start with the steps to create a simple bullet graph, followed by the steps to customizing it.

Creating the simple bullet graph

Adding a bullet graph in Pentaho BI Server community edition is a simple task. First in the Layout view, identify a column where we will drop our chart. To add a simple bullet graph, switch to the components tab, navigate to the charts section on the left and click on CCC Bullet Chart link.



Clicking on the link will add a new chart component to our configuration. We can enter some details as follows.

Parameter Value Description
Name SimpleBulletGraph Name of the component instance
Width 300 Width in pixels
Height 100 Height in pixels
Bullet Title “” Title of the bullet graph. In case, the graph is created for multiple categories, one bullet title appears for each bullet graph.
Bullet subtitle “” Subtitle of the bullet graph
Bullet Measures 90 The observed measure for this performance indicator
Bullet Markers 95 A marker, such as a target value for this performance indicator
Bullet Ranges [25,50,75,100] A coloured range showing ranges of poor, acceptable, good and excellent values or similar to help the audience interpret the data.
Title Simple Bullet Graph A title for all the graphs. In case, the graph is created for multiple categories, one bullet title appears for all the bullet graphs. Usually appears on top of the graph.
HtmlObject Panel_1 Name of the placeholder for the graph. Clicking on backspace in the text input box, displays the list of available html containers.



Clicking on preview, we can see how the out of the box bullet graph looks like.


Customizing the bullet graph

We needed to customize the bullet graph to make it match the overall site as well as apply some information architecture principles.

These include the following changes
  1. Modifying range colors
  2. Modifying the marker symbol (target value)
  3. Modifying the bar color (measure symbol) based on value relative to scale
  4. Modifying scale look and feel
  5. Modifying look and feel of the measure value.

Modifying range colors and marker symbol

Lets add another bullet graph to the second panel and set the properties very similar to our first graph.


Parameter Value Description
Name chtQualityOfLife Name of the component instance
Width 300 Width in pixels
Height 100 Height in pixels
Bullet Title “” Title of the bullet graph. In case, the graph is created for multiple categories, one bullet title appears for each bullet graph.
Bullet subtitle “” Subtitle of the bullet graph
Bullet Measures 90 The observed measure for this performance indicator
Bullet Markers 95 A marker, such as a target value for this performance indicator
Bullet Ranges [25,50,75,100] A coloured range showing ranges of poor, acceptable, good and excellent values or similar to help the audience interpret the data.
Title Quality of Life A title for all the graphs. In case, the graph is created for multiple categories, one bullet title appears for all the bullet graphs. Usually appears on top of the graph.
HtmlObject Panel_2 Name of the placeholder for the graph. Clicking on backspace in the text input box, displays the list of available html containers.




Now lets click on Advanced Properties link for the chart configuration (note the position of the mouse cursor in screenshot below).


This is what the screen looks like.


Click on the property Extension points, and add the following entries.

Parameter Value Description
bulletRange_fillStyle function(){return ["#9C9384","#DED2A0","#F2EED5","#FEFDF9"][this.index];} Changes the fill color for the ranges to a set of custom colors from the default grey. Note that number of elements in the array need to match the Bullet Ranges.
bulletMeasure_fillStyle #43578A Color of the bar
bulletMarker_shape Bar Shape of the Marker (Target) symbol
bulletMarker_lineWidth 3 Width of the Marker symbol
bulletMarker_strokeStyle #A11E13 Color of the line


Saving these settings and previewing the dashboard gives the following


Here is a close up of the updated bullet graph.



In the next post, we will see how to apply conditional formatting to the same bullet graph to make some values stand out.




Tuesday, January 15, 2013

Configuring the Google Maps Dashboard Sample using Pentaho BI Server and CTools.


In a separate blog post (http://syntharch.blogspot.com/2013/01/quality-of-life-kpis-measuring-human.html), I have started listing Social KPIs and Measures that could be used for measuring a range of social development outcomes. In this post, I will see how we can combine all these to create a BI dashboard that is driven by the performance of different government organizations using open source tools.

Starting Pentaho BI Server

In previous posts, we discussed installing Pentaho BI Server Community Edition, as well as Community Dashboard Tools on top of it. Let us navigate to the place our Pentaho BI Server is installed and start the Tomcat instance that ships with it.

On my machine, it as follows

> cd Work/Servers/Pentaho/biserver-ce
> ./start-pentaho.sh




Now, once the Tomcat instance has started, we can access the browser to launch the application. For me the URL is http://ub1204.arthgallo.com:8082/pentaho


Logging in the instance with the default username and password, we are shown the familar screen containing the home page.


I decided to check some sample dashboards and accessed the Google Maps dashboard on Steel Wheels sample, only to be told that since I was not on localhost, I should obtain a new Google key.



Turns out Google has deprecated much of the API key. The new API key management is centralized and it shows all the services that are available and their activation status.


As you can see, I activated the Google Maps API v2 and v3. Now clicking on the label for API v2, takes one to the page where the default key is visible. I deleted that key and could see a page as below.


I clicked on the button to create a new browser key, and entered the server address as below.


Clicking on the Create button, creates the key.



I now navigated to the folder on the BI Server installation, where google settings are stored. I can see a single file called googlesettings.xml.


I opened the file for editing in the text editor and entered the new key.


Now, we can go back to the application, restart Tomcat key and see the dashboard as follows.


We have the demo running now. In future posts, we will setup our own dashboards.

Friday, December 14, 2012

Install Community Dashboard Tools on Pentaho BI Server 4.5 Community Edition

Soon after installing and setting up Pentaho Community Edition on my box, I realized that it does not ship with a dashboard tool. That has to be installed from another project called CTools.

Downloading CTools

CTools is available at http://www.webdetails.pt/index.html#ctools. Once you access this URL, you will access the following page.

The page contains a link to download Ctools bundle. Accessing that link shows the following page on the Github site.



We can download the shell script and the README.txt file to our local folder. I must warn that saving the ctools-installer directly from the browser and right clicking, actually gave me the html of the current page, rather than the file. For downloading the file, I had to click the file, go into edit mode and copy-paste the contents to a local shell script file.

Anyways, I downloaded it to a folder called ctools under my Pentaho folder. The first thing is to make ctools executable. This is done by entering the following command on the command line in a terminal window.

> chmod a+x *.sh



The next thing we need to do is to run the installer with the correct parameters. This is done, as shown below.

> ./ctools-installer.sh -s pentahoServer/biserver-ce/pentaho-solutions -w pentahoServer/biserver-ce/tomcat/webapps/pentaho

On my machine, the above works out to the following.

> ./ctools-installer.sh -s ~/Work/Servers/Pentaho/biserver-ce/pentaho-solutions -w ~/Work/Servers/Pentaho/biserver-ce/tomcat/webapps/pentaho


Executing the above script, we can see that the script downloads the necessary files needed for the installation. The script prompts to replace several of the existing scripts that I accepted, as show below.


Once the prompts are through, the installation starts and finally it is done!




Now we need to start the embedded tomcat instance contained within Pentaho dashboard, and we can see that upon logging in as a user, we can access additional links for Community Dashboards (called CDB, CDV, CDE and CDC).


Accessing link for CDE (Community Dashboard Editor), the user can now define their own dashboards as shown below.



That's it. We have successfully installed Community Dashboards on Pentaho Community Edition. In the next post, we will see how to configure a dashboard.