summaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2014-09-09 20:13:20 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2014-09-09 20:13:20 +0200
commit86b2aeee83803adc2911252b2fb5cca7bbdbd34d (patch)
tree87d79ba89fbbd5325fe431469202951ceb84e6eb /static/js
parent365903c71a39733450adfdf6eb471019f8b6ff6f (diff)
downloadkosten-86b2aeee83803adc2911252b2fb5cca7bbdbd34d.tar.gz
kosten-86b2aeee83803adc2911252b2fb5cca7bbdbd34d.tar.bz2
kosten-86b2aeee83803adc2911252b2fb5cca7bbdbd34d.zip
[stats] Allow clicking everywhere
Diffstat (limited to 'static/js')
-rw-r--r--static/js/kosten.js14
-rw-r--r--static/js/kosten.ls8
2 files changed, 21 insertions, 1 deletions
diff --git a/static/js/kosten.js b/static/js/kosten.js
index b0860b7..eea79dc 100644
--- a/static/js/kosten.js
+++ b/static/js/kosten.js
@@ -137,6 +137,20 @@
}
}
},
+ chart: {
+ events: {
+ click: function(){
+ var i$, ref$, len$, p;
+ for (i$ = 0, len$ = (ref$ = this.series[0].data).length; i$ < len$; ++i$) {
+ p = ref$[i$];
+ if (p.state) {
+ constDialog.apply(p);
+ break;
+ }
+ }
+ }
+ }
+ },
xAxis: {
minTickInterval: month,
minRange: month
diff --git a/static/js/kosten.ls b/static/js/kosten.ls
index a3e19e7..3327ff3 100644
--- a/static/js/kosten.ls
+++ b/static/js/kosten.ls
@@ -84,7 +84,6 @@ export statJS = jq !->
$ data .dialog do
title: df '%B %Y' time
-
<-! $ \.stats .each
$ @
..highcharts 'StockChart' do
@@ -103,6 +102,13 @@ export statJS = jq !->
plot-options:
series:
point: events: click: const-dialog
+ chart:
+ events:
+ click: !->
+ for p in @series.0.data
+ if p.state
+ const-dialog.apply p
+ break
x-axis:
min-tick-interval: month
min-range: month