diff options
| author | Felix Hanley <felix@userspace.com.au> | 2020-03-05 10:33:37 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2020-03-05 10:33:37 +0000 |
| commit | 5e4cb1854e7dbdc0da2e892a609b7461fe7100fe (patch) | |
| tree | a4e2052e00a277fc78dc92d2355477bbb93aeeb0 /templates | |
| parent | 9d687611493d2af60f6aedb3503dd85f6b3d49d6 (diff) | |
| download | sws-5e4cb1854e7dbdc0da2e892a609b7461fe7100fe.tar.gz sws-5e4cb1854e7dbdc0da2e892a609b7461fe7100fe.tar.bz2 | |
Sparkline updates
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/charts.tmpl | 12 | ||||
| -rw-r--r-- | templates/example.tmpl | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/templates/charts.tmpl b/templates/charts.tmpl index 173cbab..e6979c6 100644 --- a/templates/charts.tmpl +++ b/templates/charts.tmpl @@ -2,8 +2,8 @@ <ul class="chart bar time"> {{ $max := .YMax }} {{ range .XSeries }} - <li class="slot{{ if eq .Time.Hour 0 }} midnight{{ end }}" data-x="{{ .Label }}" data-y="{{ .YValue }}" data-percent="{{ percent .YValue $max }}"> - <time class="bar" style="height:{{ percent .YValue $max }}%" datetime="{{ .Time }}"/> + <li class="slot{{ if eq .Time.Hour 0 }} midnight{{ end }}" data-x="{{ .Label }}" data-y="{{ .Count }}" data-percent="{{ percent .Count $max }}"> + <time class="bar" style="height:{{ percent .Count $max }}%" datetime="{{ .Time }}"/> </li> {{ end }} </ul> @@ -13,8 +13,8 @@ <ul class="chart bar vertical"> {{ $max := .YMax }} {{ range .XSeries }} - <li class="slot" data-x="{{ .Label }}" data-y="{{ .YValue }}" data-percent="{{ percent .YValue $max }}"> - <div class="bar" style="height:{{ percent .YValue $max }}%" /> + <li class="slot" data-x="{{ .Label }}" data-y="{{ .Count }}" data-percent="{{ percent .Count $max }}"> + <div class="bar" style="height:{{ percent .Count $max }}%" /> </li> {{ else }} {{ end }} @@ -25,8 +25,8 @@ <ul class="chart bar horizontal"> {{ $max := .YMax }} {{ range .XSeries }} - <li class="slot" data-x="{{ .Label }}" data-y="{{ .YValue }}" data-percent="{{ percent .YValue $max }}"> - <div class="bar" style="width:{{ percent .YValue $max }}%" /> + <li class="slot" data-x="{{ .Label }}" data-y="{{ .Count }}" data-percent="{{ percent .Count $max }}"> + <div class="bar" style="width:{{ percent .Count $max }}%" /> </li> {{ else }} {{ end }} diff --git a/templates/example.tmpl b/templates/example.tmpl index ef628ee..5da849a 100644 --- a/templates/example.tmpl +++ b/templates/example.tmpl @@ -5,7 +5,7 @@ <meta charset="utf-8"> <title>This is the title</title> <script>_sws = { local: true }</script> - <script async src="http://localhost:5000/sws.js" data-sws="http://localhost:5000/sws.gif" data-site="1"></script> + <script async src="http://localhost:5000/sws.js" data-site="1"></script> <noscript> <img src="http://localhost:5000/sws.gif" /> </noscript> |
