summaryrefslogtreecommitdiff
path: root/static/js/kosten.ls
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--static/js/kosten.ls21
1 files changed, 14 insertions, 7 deletions
diff --git a/static/js/kosten.ls b/static/js/kosten.ls
index 6106ab5..dea12f3 100644
--- a/static/js/kosten.ls
+++ b/static/js/kosten.ls
@@ -6,10 +6,16 @@ jq = (f) -> !-> $ f
# Call this to localize Highcharts
set-lang = ->
Highcharts .set-options do
+ # old colors
+ colors: [\#2f7ed8 \#0d233a \#8bbc21 \#910000 \#1aadce \#492970
+ \#f28f43 \#77a1e5 \#c42525 \#a6c96a]
lang:
- months: [\Januar, \Februar, \März, \April, \Mai, \Juni, \Juli, \August, \September, \Oktober, \November, \Dezember]
- short-months: [\Jan, \Feb, \Mär, \Apr, \Mai, \Jun, \Jul, \Aug, \Sep, \Okt, \Nov, \Dez]
- weekdays: [\Sonntag, \Montag, \Dienstag, \Mittwoch, \Donnerstag, \Freitag, \Samstag]
+ months: [\Januar \Februar \März \April \Mai \Juni \Juli
+ \August \September \Oktober \November \Dezember]
+ short-months: [\Jan \Feb \Mär \Apr \Mai \Jun \Jul
+ \Aug \Sep \Okt \Nov \Dez]
+ weekdays: [\Sonntag \Montag \Dienstag \Mittwoch \Donnerstag
+ \Freitag \Samstag]
range-selector-from: \von
range-selector-to: \bis
range-selector-zoom: null
@@ -28,7 +34,7 @@ export showJS = jq ->
$ @ .closest \.detail .children \.mark:first .click!
$ ".detail > .mark" .click ->
- if (@src.index-of \closed) is not -1
+ if (@src.index-of \closed) isnt -1
@src .= replace \closed \open
else
@src .= replace \open \closed
@@ -43,7 +49,7 @@ export showJS = jq ->
..highcharts do
title: text: null
tooltip:
- hide-delay: 200
+ hide-delay: 200ms
formatter: ->
"#{@key}: <b>#{@y.toFixed 2} €</b> / #{@percentage.to-fixed 2}%"
chart:
@@ -55,10 +61,11 @@ export showJS = jq ->
series: [
type: \pie
size: \70%
+ states: hover: halo: null
allow-point-select: true
data-labels:
color: ..css \color
- distance: 20
+ distance: 20px
data: [ {name: if v>0 then k else '' , y: v, visible: v > 0} \
for k,v of ..data \pie ]
]
@@ -67,7 +74,7 @@ export showJS = jq ->
export statJS = jq ->
set-lang!
- month = 30 * 24 * 60 * 60 * 1000
+ month = 30d * 24h * 60min * 60s * 1000ms
<- $ \.stats .each
$ @