I am trying to create a simple Sankey diagram showing flows between two
sets of nodes, and would like the two sets to have the same names. However,
this isn't allowed (it brings up a "Cycle found in rows" error), so I add
"2" to the names of the nodes in the second set, like so:
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'From');
data.addColumn('string', 'To');
data.addColumn('number');
data.addRows([
['foo', 'foo2', 6],
['bar', 'bar2', 4],
['foo', 'bar2', 6],
['bar', 'foo2', 4]
]);
var chart = new
google.visualization.Sankey(document.getElementById('sankey_basic'));
chart.draw(data);
}
However, I don't want the node labels to say "foo2" and "bar2" -- I just
want them to say "foo" and "bar". In some cases in Google Visualization API
you can solve this problem with {v: 'foo2', f: 'foo'} and {v: 'bar2', f:
'bar'}, but that doesn't work here. Is there any way I can do this?
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/0396c28a-e895-493e-b56b-87ad7fdd19cd%40googlegroups.com.