From 86b2aeee83803adc2911252b2fb5cca7bbdbd34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Tue, 9 Sep 2014 20:13:20 +0200 Subject: [stats] Allow clicking everywhere --- static/js/kosten.js | 14 ++++++++++++++ static/js/kosten.ls | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3