I am creating a (non-ribbon) chord diagram using amcharts library, and was wondering if there is a way to sort nodes given a specific value stored in the dataset.
What I am looking for is if we have for example some dataset like this :
data = [
{"from": A, "number": 3},
{"from": B, "number": 1},
{"from": C, "number": 2},
{"from": A, "to": C, "value": 1},
{"from": B, "to": A, "value": 1},
{"from": B, "to": C, "value": 1},
]
Then the nodes could be sorted depending on number
so that we have in this example B > C > A.
From what I have seen in the API and documentation, I found that we can do it with chart.sortBy
with either default
(will sort given the order that a node appears in the dataset, here A>B>C), name
(sort with the FromName
datafield property of the node in alphabetic order, here A>B>C as well) or value
(sort with the total value
datafield property of the node, ie the sum of all weighted-link going out of this nod, here B>A>C). However I couldn't find anything else than those 3 properties...
Would you know if there is a way to have a personalized sort
on the nodes ?