Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: CCC - TWO stacked bar charts combined into one bar chart

  1. #1
    Join Date
    Jun 2014
    Posts
    13

    Default CCC - TWO stacked bar charts combined into one bar chart

    Is it possible to combine two different stacked bar charts into one bar chart (with two stacked bars for each group)?
    E.g.:
    - base axis: time data [2012, 2013, 2014, 2015]
    - ortho axis (measure: Sales): stacked bars for 1st group - [Cars, Plains, Trains, Ships, Motorcycles]
    - ortho2 axis (measure: Sales): stacked bars for 2nd group - [APAC, EMEA, Japan, NA]

    Data (Group 1):
    Sales
    Year
    APAC
    EMEA
    Japan
    NA
    2012
    624
    234
    810
    671
    2013 234
    255
    184
    511
    2014 923
    122
    630
    058
    2015 172
    53
    480 250

    Data (Group 2):
    Sales
    Year Cars
    Plains
    Trains
    Ships Motocycles
    2012
    435
    446
    645
    590 223
    2013 232
    225
    422
    193 112
    2014 756
    432
    445
    57 43
    2015 245
    342
    234
    111 23

    Of course I know how create separate stacked bar charts for particular data sets. But is there any way how to combine it as they share the common "Year" members.

    Any help (even "not possible" answer) will be apreciated.

    Regards,
    Martin

  2. #2
    Join Date
    Mar 2012
    Posts
    645

    Default

    Hi,

    you can achieve the desired grouped/stacked bars by:

    * shaping the data appropriately
    * use a two-level composite base axis
    * hiding some grid-lines

    See this fiddle to get you started.

    Cheers,

  3. #3
    Join Date
    Nov 2014
    Posts
    29

    Default

    Hi Leao,

    I tried with your example , it is working fine in jsfiddle but not working in pentaho cde dashboard protovis component. I am using pentaho 5.3 . Please give some suggestion to achieve this..

  4. #4
    Join Date
    Mar 2012
    Posts
    645

    Default

    Hi berkin, when "porting" the fiddle to CDE, you should choose a corresponding CCC chart component class. In this case it is the CCC Bar Chart Component, and not the Protovis Component.

    Then, some of the options in the example can be set directly in the CDE properties panel, while others must be set in code, in preExecution (readers, visualRoles).

    See how to in http://redmine.webdetails.org/projec...xtension-point and http://forums.pentaho.com/showthread...401#post352401.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.