Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: How to pass parameters between JFreeChartComponent and xaction?

  1. #1
    Join Date
    Mar 2009
    Posts
    15

    Default How to pass parameters between JFreeChartComponent and xaction?

    Hello,

    In my attempt to create a dashboard using CDF, I have a template which consists of a combination of JFreeChartComponent and xaction elements.

    I need to pass a parameter to the xaction and this needs to come from the JFreeChartComponent piechart.

    Can this be done?

    Many thanks.

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

    Default

    Of course, that's trivial; Just need to use Dashboard.fireChange('var','value') on the urlTemplate. Check the samples
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    Mar 2009
    Posts
    15

    Default

    Oh! That was indeed trivial.

    Many thanks for responding.I will try it right away.

  4. #4
    Join Date
    Mar 2009
    Posts
    15

    Default

    Pedro, it still doesn't work.

    I have a pie-chart of type JFreeComponent and bar-chart of type xaction. On clicking the pie chart slice, a corresponding bar chart must be displayed by using the value from the pie chart. In order to pass this parameter from the pie to the bar, in the urlTemplate I have :

    Dashboards.fireChange("param1",value);

    But the bar chart is not getting this value though in the template.html its definition is set to :

    barLineChart =
    {
    name: "barLineChart",
    type: "xaction",
    solution: "cdf-samples",
    path: "dashboard",
    action: "BarChart.xaction",
    listeners:["param1"],
    parameters: [["param1", "param1"]],
    htmlObject: "barChart_object",
    preExecution:function(){},
    postExecution:function(){},
    executeAtStart: true
    }



    Am I missing something here? Please tell me what I am doing wrong.

    Thanks again.

  5. #5
    Join Date
    Mar 2009
    Posts
    15

    Default

    Sorry about the earlier post. I had the param1 missing the 1 in the listener and hence the error.

    Thanks again for taking time out to respond. Being a newbie to Pentaho dashboards, I really appreciate it!

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.