github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/templates/panel_analytics_script_memory.html (about) 1 <script> 2 let rawLabels = [{{range .Graph.Labels}} 3 {{.}},{{end}} 4 ]; 5 let seriesData = [{{range .Graph.Series}}[{{range .}} 6 {{.}},{{end}} 7 ],{{end}} 8 ]; 9 let legendNames = [{{range .Graph.Legends}} 10 {{.}},{{end}} 11 ]; 12 13 addInitHook("after_phrases", () => { 14 addInitHook("end_init", () => { 15 addInitHook("analytics_loaded", () => { 16 memStuff(window,document,Chartist); 17 buildStatsChart(rawLabels,seriesData,"{{.TimeRange}}",legendNames,1); 18 }); 19 }); 20 }); 21 </script>