github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/templates/panel_analytics_script_perf.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  			perfStuff(window,document,Chartist);
    17  			buildStatsChart(rawLabels,seriesData,"{{.TimeRange}}",legendNames,2);
    18  		});
    19  	});
    20  });
    21  </script>