0

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.

nexus-bytes
  • 122
  • 1
  • 10
  • In reality, I just want to be able to dynamically generate a digraph in Google Sheets. The ImageCharts add-on is the only option I've found so far. I'm open to other options. – nexus-bytes Jun 09 '19 at 05:46

1 Answers1

1

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

FGRibreau
  • 7,021
  • 2
  • 39
  • 48
  • 1
    I was stuck using the custom function they supplied (https://github.com/image-charts/google-sheets-add-on-dependency-graph/blob/master/main.js#L13) and that doesn't allow label properties. But, your post helped me realize I can generate my own URL and supply that to the Google Sheets IMAGE() function. Thanks! – nexus-bytes Nov 09 '19 at 06:05