Highcharts.setOptions({ lang: { months: ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], weekdays: ['sundag', 'måndag', 'tysdag', 'onsdag', 'torsdag', 'fredag', 'laurdag'] }, colors: ['#55BF3B', '#DF5353', '#7798BF', '#aaeeee', '#ff0066', '#eeaaee', '#DDDF0D', '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'] }); var chart = new Highcharts.Chart({ chart: { renderTo: 'container', zoomType: 'xy', margin: [20, 10, 40, 30], borderColor: '#4572A7', borderWidth: 0, cornerRadius: 5, dropShadow: false, backgroundColor: null, plotBorderWidth: 1, plotBorderColor: '#CCCCCC', plotBackgroundImage: '/ver/snjomengdBakgrunn2.png', plotBackgroundColor: 'rgba(40, 40, 40, .6)', plotShadow: true }, title: { text: '' }, credits: { style: { right: '10px', fontSize: '7pt' } }, xAxis: { type: 'datetime', min: null, //62, max: null, //335, lineWidth: 1, lineColor: '#CCCCCC', tickInterval: 'auto', //30, tickPixelInterval: 80, tickLength: 5, tickWidth: 1, tickColor: '#FFFFFF', tickPosition: 'outside', // 'inside' or 'outside' gridLineWidth: 1, gridLineColor: '#444444', labels: { formatter: function () { return Highcharts.dateFormat('%b', this.value); } }, plotLines: [{ value: Date.UTC(1971, 0, 01), color: '#444444', width: 3 }], dateTimeLabelFormats: { // TODO: should this be a language setting as well? weekly: '%e. %b %y', twicemonthly: '%e. %b %y', monthly: '%b %y', twomonths: '%b %y', threemonths: '%b %y', fourmonths: '%b %y', sixmonths: '%b %y', yearly: '%Y' }, showFirstLabel: true, showLastLabel: false, labelLeft: 2, labelTop: 2, labelRight: null, labelBottom: null, maxZoom: 14 * 24 * 3600, startOnTick: true, endOnTick: true }, yAxis: { min: 0, //0, max: 3.5, lineWidth: 1, lineColor: '#CCCCCC', tickInterval: 'auto', tickPixelInterval: 50, tickLength: 5, tickWidth: 1, tickColor: '#FFFFFF', tickPosition: 'inside', gridLineWidth: 1, gridLineColor: '#444444', alternateGridColor: 'rgba(0, 0, 0, .2)', minorTickInterval: null, minorTickLength: 2, minorTickWidth: 0, minorTickColor: '#cccccc', minorTickPosition: 'outside', minorGridLineWidth: 1, minorGridLineColor: '#333333', showFirstLabel: false, showLastLabel: true, labelFormatter: function () { if (this.value % 1 == 0) return hc.numberFormat(this.value, 0) +'m'; else return ''; }, labelRight: 8, labelBottom: -7, maxZoom: 1 }, legend: { layout: 'vertical', labelFormatter: function() { return this.options.name }, borderWidth: 1, borderColor: '#444444', borderCornerRadius: 5, shadow: true, backgroundColor: 'rgba(32, 32, 32, .75)', style: { position: 'absolute', zIndex: 1001, top: '40px', left: '50px', bottom: 'auto', padding: '10px' }, itemStyle: { color: '#CCCCCC', listStyle: 'none', listStyleImage: 'none' }, itemHiddenStyle: { color: '#444444' }, itemHoverStyle: { color: 'white' } }, tooltip: { formatter: function() { return "Vinteren "+ (parseInt(this.series.name) - 1) +"-"+ this.series.name +"
"+ Highcharts.dateFormat('%e. %b', this.x, true) +":
"+ Highcharts.numberFormat(100 * this.y, 0) +" cm snjo"; }, backgroundColor: 'rgba(0, 0, 0, .75)', borderWidth: 2, style: { color: '#CCCCCC' } }, plotOptions: { spline: { lineWidth: 2, shadow: true, marker: { enabled: false }, states: { hover: { //enabled: true, lineWidth: 3, marker: { symbol: 'circle', enabled: true, lineColor: 'rgb(40, 40, 40)', lineWidth: 1, radius: 3, states: { hover: { radius: 5 } } } } } }, areaspline: { lineWidth: 2, shadow: true, //fillColor: 'rgba(69, 114, 167, .3)', marker: { enabled: true }, states: { hover: { lineWidth: 3, marker: { symbol: 'circle', enabled: true, lineColor: 'rgb(0, 0, 0)', lineWidth: 1, //radius: 3, states: { hover: { radius: 5 } } } } } } }, series: [{ type: 'spline', name: '2000', data: [[27475200000, 0.00], [2.83392E+10, 0.20], [33264000000, 1.90], [3.56832E+10, 2.80], [37670400000, 3.40], [3.888E+10, 3.40], [40518000000, 3.30], [4.12092E+10, 3.00], [4.28508E+10, 2.00], [44233200000, 1.20], [44665200000, 1.10], [4.60476E+10, 0.30], [46566000000, 0.00]], visible: false }, { type: 'spline', name: '2001', data: [[24706800000, 0.00], [2.60892E+10, 0.20], [2.96352E+10, 0.10], [32400000000, 0.20], [33091200000, 0.25], [3.4128E+10, 0.35], [36892800000, 0.65], [3.82752E+10, 1.00], [4.03452E+10, 1.05], [43974000000, 0.30], [44578800000, 0.00]], visible: false }, { type: 'spline', name: '2002', data: [[25225200000, 0.00], [26265600000, 0.20], [2.88576E+10, 0.50], [31622400000, 0.60], [3.24864E+10, 0.50], [3.37824E+10, 0.90], [3.64608E+10, 2.00], [37670400000, 2.90], [3.85344E+10, 2.70], [39567600000, 2.30], [4.08636E+10, 2.00], [4.16412E+10, 1.80], [4.25916E+10, 1.55], [4.3542E+10, 1.10], [4.44924E+10, 0.40], [4.4838E+10, 0.00]], visible: false }, { type: 'spline', name: '2003', data: [[2.51388E+10, 0.00], [25830000000, 0.30], [2.64384E+10, 0.50], [27043200000, 0.25], [27648000000, 0.50], [28598400000, 0.40], [30067200000, 0.40], [3.07584E+10, 0.40], [3.17088E+10, 0.47], [32313600000, 0.50], [3.33504E+10, 1.20], [34041600000, 1.20], [3.55104E+10, 1.30], [3.62016E+10, 1.25], [3.7584E+10, 1.50], [3.83616E+10, 1.45], [3.94812E+10, 1.65], [4.02588E+10, 1.60], [4.06908E+10, 1.50], [41814000000, 1.20], [42418800000, 1.15], [43369200000, 1.05], [4.4406E+10, 0.40], [44578800000, 0.25], [4.47516E+10, 0.00]], visible: false }, { type: 'spline', name: '2004', data: [[2.77344E+10, 0.00], [2.81664E+10, 0.10], [2.86848E+10, 0.20], [29376000000, 0.40], [3.03264E+10, 0.50], [3.05856E+10, 0.60], [3.12768E+10, 0.65], [3.18816E+10, 0.65], [32313600000, 0.65], [3.2832E+10, 0.80], [33868800000, 1.00], [3.47328E+10, 1.15], [3.52512E+10, 1.10], [3.5856E+10, 1.10], [36720000000, 1.20], [3.7152E+10, 1.20], [37670400000, 1.20], [38793600000, 1.35], [3.9654E+10, 1.25], [4.08636E+10, 1.15], [41727600000, 0.80], [42073200000, 0.65], [42678000000, 0.25], [4.311E+10, 0.00]], visible: false }, { type: 'spline', name: '2005', data: [[26352000000, 0.01], [26870400000, 0.10], [2.86848E+10, 0.20], [29721600000, 0.20], [31017600000, 0.55], [3.1536E+10, 0.60], [31795200000, 0.97], [32313600000, 1.61], [3.2832E+10, 1.90], [3.33504E+10, 1.85], [3.47328E+10, 2.02], [35337600000, 2.43], [35942400000, 2.51], [37065600000, 2.47], [37843200000, 2.48], [38188800000, 2.53], [3.888E+10, 2.31], [39567600000, 2.20], [40086000000, 2.45], [4.06044E+10, 2.59], [41382000000, 2.37], [41986800000, 2.20], [4.31964E+10, 1.90], [4.47516E+10, 1.20], [4.5702E+10, 0.80], [46220400000, 0.40], [46566000000, 0.00]], visible: false }, { type: 'spline', name: '2006', data: [[26265600000, 0.00], [2.79072E+10, 0.15], [2.96352E+10, 0.20], [3.03264E+10, 0.25], [3.09312E+10, 0.30], [32140800000, 0.27], [3.2832E+10, 0.48], [33264000000, 0.67], [3.39552E+10, 0.69], [34214400000, 0.69], [3.456E+10, 0.69], [35164800000, 0.79], [35942400000, 0.68], [3.63744E+10, 0.74], [3.69792E+10, 0.75], [3.73248E+10, 0.75], [38707200000, 0.75], [3.93084E+10, 0.77], [39567600000, 0.89], [39999600000, 0.99], [40431600000, 1.15], [41382000000, 1.39], [41986800000, 1.09], [42418800000, 0.80], [43282800000, 0.40], [43974000000, 0.00]], visible: true }, { type: 'spline', name: '2007', data: [[2.56572E+10, 0.00], [26265600000, 0.36], [27216000000, 0.35], [27820800000, 0.48], [2.99808E+10, 1.00], [30499200000, 1.11], [3.09312E+10, 0.90], [32572800000, 1.76], [33264000000, 2.20], [33868800000, 2.17], [3.4128E+10, 2.40], [34473600000, 2.25], [3.47328E+10, 2.34], [3.50784E+10, 2.27], [3.56832E+10, 2.27], [36288000000, 2.39], [37497600000, 2.48], [3.81024E+10, 3.07], [38448000000, 2.93], [3.93084E+10, 2.78], [39740400000, 2.80], [39999600000, 2.94], [40172400000, 2.94], [41986800000, 2.25], [42937200000, 2.02], [4.3542E+10, 1.98], [4.41468E+10, 1.78], [44665200000, 1.40], [45270000000, 0.55], [4.60476E+10, 0.20], [46220400000, 0.00]], visible: true }, { type: 'spline', name: '2008', data: [[2.59164E+10, 0.00], [27043200000, 0.60], [2.77344E+10, 0.70], [28944000000, 0.80], [29548800000, 0.60], [3.01536E+10, 0.60], [31190400000, 0.67], [3.1536E+10, 0.81], [32140800000, 0.78], [3.24864E+10, 0.98], [3.37824E+10, 1.84], [34992000000, 1.80], [3.56832E+10, 1.80], [3.62016E+10, 1.92], [36892800000, 2.49], [37497600000, 2.79], [37843200000, 2.73], [38707200000, 2.61], [3.94812E+10, 2.76], [39826800000, 2.82], [40431600000, 2.80], [4.21596E+10, 2.10], [4.41468E+10, 1.10], [4.53564E+10, 0.25], [45615600000, 0.00]], visible: true }, { type: 'spline', name: '2009', data: [[2.51388E+10, 0.00], [25830000000, 0.20], [2.88576E+10, 0.47], [29721600000, 0.55], [3.09312E+10, 1.38], [32140800000, 1.38], [32745600000, 1.38], [34214400000, 1.38], [34819200000, 1.48], [35942400000, 1.50], [3.7584E+10, 1.89], [38707200000, 2.00], [3.9654E+10, 1.94], [40086000000, 1.91], [40431600000, 1.75], [4.095E+10, 1.60], [4.40604E+10, 0.60], [44578800000, 0.35], [45183600000, 0.00]], visible: true }, { type: 'areaspline', name: '2010', fillColor: 'rgba(170, 238, 238, .5)', data: [[2.43612E+10, 0.00], [2.47932E+10, 0.15], [28598400000, 0.35], [2.9808E+10, 0.46], [3.1536E+10, 0.59], [33523200000, 0.58], [34214400000, 0.62], [3.47328E+10, 0.65], [36115200000, 0.77], [37238400000, 0.77], [3.77568E+10, 0.79], [38620800000, 0.86], [3.9654E+10, 0.80], [4.08636E+10, 0.94], [41382000000, 0.90], [43282800000, 0.39], [43714800000, 0.00]], visible: true }] });