Hi @yarhuoy
I don’t think you can do it with a simple GraphQL query, but the order is returned in the data you show. The label_posittion 0 holds labelId 5 (which is level 0), label_position 1 holds labelId 0 (which is level 1, etc. Depending on the programming environment you run this graphQL from you need to joggle with the ids and positions.
Hope that make sense.
Hi @basdebruin
I noticed that “labels_positions_vs2” is not always returned, for example:
and this is what I get
Based on this result, I wouldn’t know the order will be Done > Working on it > Stuck, can you please advise?
Br, YarHuoy
hi @yarhuoy
If you run the exact same query and the structure of the return value change I would advice to contact monday support.
Hey @yarhuoy
I’d love to shed more light onthis.
Currently, our API will always return the Status values in the order of their index values. By default, this means that a certain Index will correspond to a specific color. For example, Index 5 matches a Grey color, whereas Index 2 is red.
You can find the map of index values here:
Status Index Value Map
That said, those labels could change their positions if a user chooses to do so. Just to make sure we’re on the same page here, would you be able to clarify what your app is looking to do with the order of labels here?
I also recommend reaching out to us via email so we can troubleshoot further 🙂
-Alex
Hi @AlexSavchuk
Based on my example above, my screenshot does include “grey” color, but in the json result, it does not includes index “5” in the labels
. I will not be able to find out the order of the labels in the screenshot is Done > Working on it > Stuck > "" > "" > "" > ""
if the json does not return labels_positions_v2
.
We are developing a radar chart here, and we define the value based on the order of the labels (item 1 = 1, item 2 = 2, and so on.).
May I know what email should I contact to discuss further?
Br, YarHuoy
@yarhuoy
Thank you for circling back with me!
The grey label will either be returned as null, or as an index value of 5. You can assume both to be the same color.
I’ve just DMed you, thanks so much for your patience and cooperation 🙂
-Alex