Hitachi Vantara Pentaho Community Forums
Results 1 to 9 of 9

Thread: confused about drilldowns on cde

  1. #1

    Default confused about drilldowns on cde

    Help? Ive been stuck on this all day. I cant get my head around why its not working. Im new to cde and am trying to make a bar chart that when a bar is clicked on opens another bar chart, preferably in the same window although for simplifying things, a different window is ok to begin with... I think theres something wrong with either the parameters or the click action code...

    I created 2 rows in the cde layout. The first bar chart works fine. For the second one, my sql query looks like this

    select stat,percent from table1
    where sname = ${Sname}

    I then, on the data sources screen, clicked parameters and entered Arg0: Sname Val0: NameA Type0: String
    Then on Components I add Simple parameter, Name Sname Property value NameA
    Next on the bar chart component for the 2nd chart I set listener to Sname and click parameters then put Arg0: Sname Val0: Sname (and do the other bits - width, height etc)
    Last step I go to the 1st chart and set clickable to True and Click Action code is like this:-

    function (s){

    Dashboards.fireChange('Sname',s);
    }

    When i run the preview, both charts show as the 2nd is using the default value i set which was NameA but when I click anything on the top chart, the 2nd one says no data found.

    Being new, I am confused and not sure what I have done wrong?
    Bit more info, both bar charts use different sql data sources but the same database table.

    If anyone understands my description can they offer some help please?
    Last edited by fatbob; 05-14-2012 at 05:57 AM.

  2. #2
    Join Date
    May 2011
    Posts
    117

    Default have you set the Listner : name on second chart ??

    Hi ,

    have you set the listener name on second chart ??

    My opinion first try the both chart in different window and make it workable , then attach the click action on it.

    Let me know if any confusion.

    Regards,
    Pranav.
    (skype: pranav.lakhani )

  3. #3

    Default

    Hi,
    Thanks for the reply. Yes the listener is set on the second chart to 'name'. Both charts do work correctly by themselves. Its only when clicking on a bar in the first chart I get the 'no data found' message on the 2nd chart. I think its just not updating the value of the parameter with the series name of the first bar chart....

  4. #4
    Join Date
    May 2011
    Posts
    117

    Default

    Hi,

    Good to hear that its working now.

    Regards, Pranav

  5. #5

    Default

    Hi,

    No it is not working.

    Both charts display when i click preview, the 2nd chart shows the default series value which i set on the parameter 'Property value' but when i click any bar in the first chart, the second chart displays 'no data found'

  6. #6
    Join Date
    May 2011
    Posts
    117

    Default check with alert.

    Hi ,

    Please put the alert and check the value is passing into parameter or not ?

    Regards, Pranav
    (add me on skype , pranav.lakhani)
    Last edited by Lakhani_pranav; 05-14-2012 at 10:01 AM.

  7. #7

    Default

    I am unfortunately new to javascript but added this line to the click action code in the hope that its what you mean

    alert(Sname.value);

    When I click on a bar in the 1st chart, the popup says 'undefined'

    Ive added you to skype incase I see you on there. Thanks

  8. #8
    Join Date
    Dec 2010
    Posts
    304

    Default

    Hi, use

    alert(Sname);

  9. #9

    Default

    Aha. Yes, when i do that the alert says 'Serie'. I changed the 'Series in rows' to true for the bar chart and now it works! Thanks everyone for your help. One more question though, is it possible to drilldown in the same window? So that the 2nd chart opens on top of the first one?...

    [edit]Doesnt matter, fixed
    Last edited by fatbob; 05-15-2012 at 06:34 AM.

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.