È possibile ordinare per nome usando sankey? Ad esempio:Ordina per nome nella tabella Sankey
Esempio:https://jsfiddle.net/Khrys/1s3shf2m/
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'From');
data.addColumn('string', 'To');
data.addColumn('number', 'Weight');
data.addRows([
[ 'A', 'Mango', 5 ],
[ 'A', 'Mango', 7 ],
[ 'A', 'Apple', 6 ],
[ 'B', 'Coconut', 2 ],
[ 'B', 'Mango', 9 ],
[ 'B', 'Pineapple', 4 ]
]);
// Sets chart options.
var options = {
width: 600,
};
// Instantiates and draws our chart, passing in some options.
var chart = new google.visualization.Sankey(document.getElementById('sankey_basic'));
chart.draw(data, options);
}
mi aspetto un uscita del lato destro di essere (dall'alto verso il basso): Apple, noce di cocco, mango, ananas
Grazie