cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change the data order of the pie chart?

SOLVED
Highlighted
Participant

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

Hi,

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

View solution in original post

2 REPLIES 2

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

Hi,

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

View solution in original post

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

Dear Kieron,

       I have tried second method. It is OK now.

      WeChat Image_20170524093517.png

  Thank you!