Skip to content

Commit

Permalink
enable the Dygraphs range selector
Browse files Browse the repository at this point in the history
  • Loading branch information
fazalmajid committed Mar 23, 2021
1 parent 8c6f339 commit 4a78e7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions initial.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function get_color(i, total) {
{{ $host_count := len .Header }}
g = new Dygraph(
document.getElementById("ping"), data, {
showRangeSelector: true,
labels: [{{range $i, $h := .Header -}}
{{if (ne $i 0)}},{{end}}"{{$h}}"
{{- end}}],
Expand Down Expand Up @@ -120,6 +121,7 @@ g = new Dygraph(
return html;
},
zoomCallback: function(minDate, maxDate, yRanges) {
//console.log("zoomCallback", minDate, maxDate, yRanges);
dmin = minDate;
dmax = maxDate;
// find the last data point in the zoom range
Expand Down
2 changes: 1 addition & 1 deletion statik.go

Large diffs are not rendered by default.

0 comments on commit 4a78e7b

Please sign in to comment.