21 lines
463 B
HTML
21 lines
463 B
HTML
|
<script>
|
||
|
let rawLabels = [{{range .Graph.Labels}}
|
||
|
{{.}},{{end}}
|
||
|
];
|
||
|
let seriesData = [{{range .Graph.Series}}[{{range .}}
|
||
|
{{.}},{{end}}
|
||
|
],{{end}}
|
||
|
];
|
||
|
let legendNames = [{{range .Graph.Legends}}
|
||
|
{{.}},{{end}}
|
||
|
];
|
||
|
|
||
|
addInitHook("after_phrases", () => {
|
||
|
addInitHook("end_init", () => {
|
||
|
addInitHook("analytics_loaded", () => {
|
||
|
perfStuff(window, document, Chartist);
|
||
|
buildStatsChart(rawLabels, seriesData, "{{.TimeRange}}",legendNames,2);
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
</script>
|