From 245bb92b7f443b43d1d56ec8427f2e7ceb97b9fd Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Mon, 25 Aug 2014 23:22:33 +0200 Subject: Upgrade to newer highstock version --- static/js/kosten.ls | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'static/js/kosten.ls') 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}: #{@y.toFixed 2} € / #{@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 $ @ -- cgit v1.2.3-70-g09d2