From 9771a7352e0eafb8ed011f1bee98a537e23ebaa5 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 1 May 2016 14:36:48 +0200 Subject: Add normale expenses to stats-page --- static/js/kosten.ls | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'static/js/kosten.ls') diff --git a/static/js/kosten.ls b/static/js/kosten.ls index 163d670..699fcd4 100644 --- a/static/js/kosten.ls +++ b/static/js/kosten.ls @@ -113,10 +113,10 @@ export showJS = jq !-> export statJS = jq !-> set-lang! + df = Highcharts.date-format month = 30d * 24h * 60min * 60s * 1000ms const-dialog = !-> - df = Highcharts.date-format time = @x data <-! $.get df '/stats/_const/%Y/%m' time @@ -140,7 +140,7 @@ export statJS = jq !-> 0,0,0,0 # time plot-options: series: - point: events: click: const-dialog + stacking: \normal chart: events: click: !-> @@ -151,13 +151,27 @@ export statJS = jq !-> x-axis: min-tick-interval: month min-range: month + y-axis: + reversed-stacks: false + tick-interval: 250 series: [ - data: ..data \stats + # const + * data: ..data \consts + step: \left + name: \Konstant + point: events: click: const-dialog + # normal exps + * data: ..data \expenses + name: \Variabel step: \left ] tooltip: - point-format: '{point.y} €
' - + shared: true + formatter: -> + header = "#{df '%B %Y' @x}
" + body = ["#{p.series.name}: #{p.point.y} €
" for p in @points] .join '' + footer = "Summe: #{@points.0.total}" + header + body + footer # Categories export catsJS = jq !-> -- cgit v1.2.3-70-g09d2