How to add weights to digraph?

121 Views Asked by At

I just found ImageCharts add-on for Google Sheets to embed a digraph in a cell (https://documentation.image-charts.com/guides/graph-in-google-sheets/). It's really neat and helpful, but I need to be able to add weights (i.e. edge labels). ImageCharts shows an example of this in the "Full Graph" on https://documentation.image-charts.com/graph-viz-charts/. But I don't see a way to pass weights using the Google Sheets add-on.

I'd be open to suggestions that involve apps script in Google Sheets.

1

There are 1 best solutions below

1
FGRibreau On BEST ANSWER

Using the label property you can do it:

https://image-charts.com/chart?cht=gv&chl=digraph G {
 a -> b [ label="a to b" ];
 b -> c [ label="another label"];
}

graph with edge labels