Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: bar chart order by parameter?

  1. #1

    Default bar chart order by parameter?

    Hello. Im trying to control the display order of a horizontal bar chart by using a dropdown selector to select either the name or percentage field to sort by. But its not working

    I have a parameter called sorder which i am successfully passing values to from the select component and the chart is listening to the parameter.

    The sql query is for the chart is

    select name,percentage from cde2
    order by ${sorder} asc

    Problem is, the graph redraws when the dropdown options are selected (name or percentage) but the order doesnt change on the chart and the chart is displaying in name desc order.

    It should be possible to order by a parameter shouldnt it? Not sure what im doing wrong

  2. #2
    Join Date
    Jul 2007


    Actually, being sql, that's not possible like that. That falls into the sql prepared statement rules, and that's not allowed.

    For sql, I guess the best approach would be playing with the postFetch and do your manual ordering (or then trying to make up a different query that doesn't use parameters on the order by clause)
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3


    Hmm, i will have a look at that thanks. Any tips on what the post fetch code would look like? Its not that im lazy, im just new to javascript..

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.