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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Can I change the data order of the pie chart?

tguo
4-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
khayes1
13-Aquamarine
(To:tguo)

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
khayes1
13-Aquamarine
(To:tguo)

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

tguo
4-Participant
(To:khayes1)

Dear Kieron,

       I have tried second method. It is OK now.

      WeChat Image_20170524093517.png

  Thank you!

Top Tags