aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2020-02-20 05:41:38 +0000
committerFelix Hanley <felix@userspace.com.au>2020-02-20 05:41:38 +0000
commitf0b363741a50ecba0ae7785c32e96c742af9e3db (patch)
treefd89b5192f7cf4e8c1faa242236d882ccc7bee77
parent8e53f314cab7e96fb11e4a8d1dfe537e58bcc9ed (diff)
downloadsws-f0b363741a50ecba0ae7785c32e96c742af9e3db.tar.gz
sws-f0b363741a50ecba0ae7785c32e96c742af9e3db.tar.bz2
Fix chart css
-rw-r--r--static/default.css4
-rw-r--r--templates/charts.tmpl2
2 files changed, 3 insertions, 3 deletions
diff --git a/static/default.css b/static/default.css
index 42f5b81..aa1b8f6 100644
--- a/static/default.css
+++ b/static/default.css
@@ -76,7 +76,7 @@ main {
.chart .slot:before,
.chart .slot:after {
bottom: 100%;
- content: attr(data-count);
+ content: attr(data-y);
display: none;
font-size: .75em;
left: 50%;
@@ -88,7 +88,7 @@ main {
}
/* time */
.chart .slot:after {
- content: attr(data-date);
+ content: attr(data-x);
margin-top: .5rem;
top: 100%;
}
diff --git a/templates/charts.tmpl b/templates/charts.tmpl
index d0d973f..d5d6db0 100644
--- a/templates/charts.tmpl
+++ b/templates/charts.tmpl
@@ -2,7 +2,7 @@
<ul class="chart bar">
{{ $max := .CountMax }}
{{ range .Data }}
- <li class="slot{{ if eq .Time.Hour 0 }} midnight{{ end }}" data-date="{{ .Time|timeHour }}" data-count="{{ .Count }}" data-percent="{{ percent .Count $max }}">
+ <li class="slot{{ if eq .Time.Hour 0 }} midnight{{ end }}" data-x="{{ .Time|timeHour }}" data-y="{{ .Count }}" data-percent="{{ percent .Count $max }}">
<div class="bar" style="height:{{ percent .Count $max }}%" />
</li>
{{ end }}