diff options
Diffstat (limited to 'static/js/kosten.ls')
-rw-r--r-- | static/js/kosten.ls | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/static/js/kosten.ls b/static/js/kosten.ls index 8bf746d..fa96f4a 100644 --- a/static/js/kosten.ls +++ b/static/js/kosten.ls @@ -24,6 +24,31 @@ export showJS = jq -> $ \.details .hide! + # draw the pies + <- $ \.pie .each + $ @ + ..highcharts do + title: text: null + tooltip: + hideDelay: 200 + formatter: -> + "#{@key}: <b>#{@y.toFixed 2} €</b> / #{@percentage.toFixed 2}%" + chart: + backgroundColor: null + plotBorderWidth: null + plotShadow: off + margin: [0,0,0,0] + credits: enabled: false + series: [ + type: \pie + size: \50% + allowPointSelect: true + dataLabels: + color: ..css \color + data: [ {name: if v>0 then k else '' , y: v, visible: v > 0} \ + for k,v of ..data \pie ] + ] + # Categories export catsJS = jq -> counter = 0 |