Hitachi Vantara Pentaho Community Wiki

Gallery

Skip to end of metadata
Go to start of metadata

This is a place to share your dashboard designs either as screen shots or including all the sources.

Labels

dashboard dashboard Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 20, 2008

    Kevin Haas says:

    Button, Button, Who's Got the Button? One of the great things about the CDF is ...

    Button, Button, Who's Got the Button?

    One of the great things about the CDF is the concept of listeners, where you can easily set components like charts to listen on the controls like select lists. These charts update automatically when the listener is changed, which is an awesome feature.

    But there are cases where you don't want this behavior. When you're selecting interim lists of values or even under the date picker, constant refreshing can slow the user experience. How do you change this feature in cases where you want the charts to be refreshed on demand by the user on the click of a button? Try this:

    1. Add a button in the desired location for your selected dashboard in template.html, and include a reference to a function that you'll create. This function could be named anything, in this example it's called "refresh_charts()"

    <"BUTTON" name="refresh" value="Refresh" OnClick="refresh_charts()">
    

    2. Remove the listeners from your chart component in template.html. It should look something like this:

    chart_a =
    {
      name: "chart_a",
      type: "xaction",
      solution: "dashboards",
      path: "path_name",
      action: "chart_a.xaction",
      listeners:[],
      parameters: [["STARTDATE","startDate"],["ENDDATE","endDate"]],
      htmlObject: "object_a",
      executeAtStart: true,
      preExecution:function(){},
      postExecution:function(){}
    }
    

    3. Then at the bottom on your template.html, below the load() function, add the function specified earlier in the button to refresh the charts. In this case, it refreshes chart_a, specified above in step 2.

    function refresh_charts(){
        Dashboards.update(chart_a);
    }
    

    That should work. Give it a try and see if it works for you.

  2. Aug 28, 2008

    jorge ernesto maria arroyo says:

    In step number one I think there is a little mistake: I think that you have to p...

    In step number one I think there is a little mistake: I think that you have to put the button like this

    <input type="button" name="refresh" value="Refresh" OnClick="refresh_charts()" />

    See you