Pentaho Tools :

Pentaho C-Tools(CDE,CDF,CDA),Pentaho CE & EE Server,OLAP-Cubes,Analysis using Pivot4J, Saiku Analytics, Saiku Reporting, Ad-hoc Reporting using Interactive Reporting Tool,Dashboards,Reports using PRD, PDD,Data Integration using Kettle ETL,Data Mining usign WEKA,Integration of Servers with Databases,Mobile/iPad compatible Dashboards using Bootstrap Css,Drilldown dashboards,Interactive Dashboards

Wednesday, 6 November 2013

Bar chart with Target lines in pentaho CDE - making bars as lines using java script in pentaho CDE

Hi guys,

This post teach you how to make bars as lines in pentaho CDE.

Source for this post is : http://jsfiddle.net/duarteleao/7maGD/
and http://type-exit.org/adventures-with-open-source-bi/2011/06/creating-dashboards-with-cde/

Scenario : Some end users wants visualization of grouped bars as lines where one of the bar is as bar and remaining bars as targeted lines on the same bar.


Properties have to give:
Plot2 : True
Find the remaining properties in below image: version of CDE is : 13.06 but will work in higher versions also.
In "Extension points" for the chart component you need to give 3 properties from the first link.
They are 

 extensionPoints: {
        plot2Dot_shape: 'bar',
        plot2Dot_shapeSize: function() {
                       var diam = this.chart.plotPanels.bar.barWidth ||
                       this.chart.options.barSizeMax;
           
                     return this.finished(diam);
        },
        plot2Dot_shapeAngle: function() {
            return this.chart.isOrientationHorizontal() ? 0 : -Math.PI/2;
        }

NOTE: Find the image for how to give the above code as properties in Extension points of chart  component.

 Sample output of the chart on dashboard after giving the above properties.

 

Sadakar
BI developer
("Learning never exhausts the mind")


1 comment:

  1. Hi Sadakar thanks for the post.
    But I want to create a bar chart for different months. And want to create target lines for each month with different colors. Each target will extend till the end of the chart .
    The way to identify those target lines is through color say red is the color for January
    Please help

    ReplyDelete