Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Creating Drill Down Bar Chart in CDE

  1. #1

    Default Creating Drill Down Bar Chart in CDE

    Hello all,
    I want to create a Bar chart in CDE having Drill Down capability. for example if I have clicked on one of the bar then a table should be generated having detail of that bar in another panel of dathboard.

  2. #2
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    That's absolutely possible, you need is to define the clickAction and then do whatever you want with it
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3

    Exclamation How to define clickable action

    Hello, I dont know how to define click action so can you define more so that I will be able to sort out the problem.

  4. #4
    Join Date
    Mar 2012
    Posts
    645

    Default

    Experiment CCCv2 here: http://www.webdetails.pt/ctools.html#tabccc > "CCC.CHARTS" > "BAR".

    Add the following code to the JSON definition of any of the bar examples:
    Code:
    clickAction: function(scene) {
            alert("series = " + scene.vars.series.value + "\ncategory = " + scene.vars.category.value + "\nvalue = " + scene.vars.value.value);
    },
    This one is more sexy:
    Code:
    clickAction: function(scene) {
        alert(scene.format("series: {series}\ncategory: {category}\nvalue: {value}"));
    },
    This one is more general:
    Code:
    clickAction: function(scene) {
        var text = [];
        for(var n in scene.vars) {
            var sceneVar = scene.vars[n];
            text.push(n + ": " + JSON.stringify(sceneVar.value) + ' ("' + sceneVar.label + '")');
        }
        alert(text.join("\n"));
    },
    In CDE, you have the "clickAction" chart option. There you place only the "function(scene) {..." part.

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.