2 Replies Latest reply on Jan 18, 2018 10:51 AM by tguo RSS
    tguo Explorer

    Can I change the data order of the pie chart?

    Hi all,


       My pie chart is like this:

       WeChat Image_20170523174528.png

    The status is "Medium", "OK" and "Severe". How can I change the order of status to Severe, Medium and OK or vice versa?

      • Re: Can I change the data order of the pie chart?
        khayes Apprentice


        I think the way you would do this is to sort your infotable into the order you want before passing the data to the widget. There is a Sort() service in the snippets under 'infotable' category. I guess there are a number of ways to do this.

        1. Assign a number value to each category.

        2. sort alphabetically

        although these wouldn't give you many variations.


        Probably the best way to do it would be to query each category individually, in the order you want, then add them to a final infotable. So, Query only for 'OK' category, add the output to a result infotable, Next Query for 'Medium' category and add the output to the results infotable... and so on