在程序中计算出的权重需要显示在图表中。我在代码中添加了一个从此处获取的示例:https://developers.google.com/chart/interactive/docs/gallery/linechart#creating-material-line-charts
显然,可变数据需要替换为权重,因此可以丢弃现有数据(第17至31行)。随附最新版本的代码
ojit_pre
我不知道为什么这些图表不被显示。
事先考虑伸出援助之手

最佳答案

请检查this example

因此,主要问题是Container is not defined

在您的代码中,您编写了document.getElementById('#chart_weights'),但您应编写不带document.getElementById('chart_weights')#

07-24 09:39
查看更多