【问题标题】:How to add weights to digraph?如何为有向图添加权重?
【发布时间】:2019-06-09 05:45:02
【问题描述】:

我刚刚发现 Google 表格的 ImageCharts 插件可以在单元格中嵌入有向图 (https://documentation.image-charts.com/guides/graph-in-google-sheets/)。它真的很整洁而且很有帮助,但我需要能够添加权重(即边缘标签)。 ImageCharts 在https://documentation.image-charts.com/graph-viz-charts/ 的“完整图表”中显示了一个示例。但我看不到使用 Google 表格插件传递权重的方法。

我愿意接受涉及 Google 表格中的应用脚本的建议。

【问题讨论】:

  • 实际上,我只是希望能够在 Google 表格中动态生成有向图。 ImageCharts 插件是迄今为止我发现的唯一选项。我愿意接受其他选择。

标签: google-sheets image-charts


【解决方案1】:

使用label property 你可以做到:

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

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2018-07-18
  • 2022-01-18
  • 1970-01-01
  • 2017-04-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多