diff options
Diffstat (limited to '')
-rw-r--r-- | static/js/kosten.ls | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/static/js/kosten.ls b/static/js/kosten.ls index dea12f3..01bc10c 100644 --- a/static/js/kosten.ls +++ b/static/js/kosten.ls @@ -76,6 +76,16 @@ export statJS = jq -> month = 30d * 24h * 60min * 60s * 1000ms + const-dialog = !-> + df = Highcharts.date-format + diag_opts = + #title: "Konstante Ausgaben #{df '%b %Y' @x}" + title: df '%B %Y' @x + + data <-! $.get df '/stats/_const/%Y/%d' @x + $ data .dialog diag_opts + + <- $ \.stats .each $ @ ..highcharts 'StockChart' do @@ -83,15 +93,17 @@ export statJS = jq -> credits: enabled: false range-selector: buttons: [] - input-date-format: "%d. %b %Y" - input-edit-date-format: "%d.%m.%Y" + input-date-format: "%b %Y" + input-edit-date-format: "%m.%Y" input-date-parser: (value) -> value .= split /\./ - Date.UTC value[2], # year - value[1] - 1, # month ... 0-based -.- - value[0], #day + Date.UTC value[1], # year + value[0] - 1, # month ... 0-based -.- + 1, #day 0,0,0,0 # time - + plot-options: + series: + point: events: click: const-dialog x-axis: min-tick-interval: month min-range: month @@ -99,7 +111,7 @@ export statJS = jq -> data : ..data \stats ] tooltip: - point-format: "<b>{point.y} €</b><br/>" + point-format: '<b>{point.y} €</b><br/>' # Categories |