var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787868000000,13.90000000],[1787868180000,13.86000000],[1787868480000,13.88000000],[1787868780000,13.74000000],[1787869080000,13.70000000],[1787869380000,13.66000000],[1787869680000,13.60000000],[1787869980000,13.60000000],[1787870280000,13.48000000],[1787870580000,13.28000000],[1787870880000,13.14000000],[1787871180000,12.98000000],[1787871480000,12.84000000],[1787871780000,12.82000000],[1787872080000,13.00000000],[1787872380000,13.18000000],[1787872680000,13.12000000],[1787872980000,12.98000000],[1787873280000,12.86000000],[1787873580000,12.74000000],[1787873880000,12.56000000],[1787874180000,12.36000000],[1787874480000,12.22000000],[1787874780000,12.10000000],[1787875080000,12.02000000],[1787875380000,12.08000000],[1787875680000,12.18000000],[1787875980000,12.20000000],[1787876280000,12.06000000],[1787876580000,11.90000000],[1787876880000,11.78000000],[1787877180000,11.70000000],[1787877480000,11.58000000],[1787877780000,11.46000000],[1787878080000,11.40000000],[1787878380000,11.46000000],[1787878680000,11.50000000],[1787878980000,11.48000000],[1787879280000,11.64000000],[1787879580000,11.58000000],[1787879880000,11.46000000],[1787880180000,11.36000000],[1787880480000,11.20000000],[1787880780000,11.04000000],[1787881080000,10.90000000],[1787881380000,10.98000000],[1787881680000,10.90000000],[1787881980000,10.90000000],[1787882280000,10.84000000],[1787882580000,10.62000000],[1787882880000,10.58000000],[1787883180000,10.54000000],[1787883480000,10.70000000],[1787883780000,10.80000000],[1787884080000,10.80000000],[1787884380000,10.80000000],[1787884680000,10.80000000],[1787884980000,11.02000000],[1787885280000,10.90000000],[1787885580000,10.80000000],[1787885880000,10.68000000],[1787886180000,10.56000000],[1787886480000,10.42000000],[1787886780000,10.30000000],[1787887080000,10.16000000],[1787887380000,10.00000000],[1787887680000,9.92000000],[1787887980000,10.06000000],[1787888280000,9.96000000],[1787888580000,9.86000000],[1787888880000,9.80000000],[1787889180000,9.78000000],[1787889480000,9.70000000],[1787889780000,9.74000000],[1787890080000,9.80000000],[1787890380000,9.90000000],[1787890680000,10.08000000],[1787890980000,10.42000000],[1787891280000,10.72000000],[1787891580000,10.98000000],[1787891880000,11.34000000],[1787892180000,11.68000000],[1787892480000,12.00000000],[1787892780000,12.34000000],[1787893080000,12.72000000],[1787893380000,13.14000000],[1787893680000,13.44000000],[1787893980000,13.74000000],[1787894280000,14.02000000],[1787894580000,14.40000000],[1787894880000,14.70000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787868000000,8.3],[1787868180000,8.4],[1787868480000,8.4],[1787868780000,8.3],[1787869080000,8.3],[1787869380000,8.3],[1787869680000,8.3],[1787869980000,8.3],[1787870280000,8.2],[1787870580000,8.1],[1787870880000,8.1],[1787871180000,8.1],[1787871480000,8],[1787871780000,8],[1787872080000,8],[1787872380000,8.2],[1787872680000,8.1],[1787872980000,8.1],[1787873280000,8],[1787873580000,7.9],[1787873880000,7.8],[1787874180000,7.7],[1787874480000,7.7],[1787874780000,7.5],[1787875080000,7.6],[1787875380000,7.5],[1787875680000,7.5],[1787875980000,7.5],[1787876280000,7.4],[1787876580000,7.4],[1787876880000,7.3],[1787877180000,7.3],[1787877480000,7.2],[1787877780000,7.2],[1787878080000,7.1],[1787878380000,7.2],[1787878680000,7.1],[1787878980000,7.1],[1787879280000,7.2],[1787879580000,7.3],[1787879880000,7.3],[1787880180000,7.3],[1787880480000,7.2],[1787880780000,7.1],[1787881080000,7.1],[1787881380000,7.2],[1787881680000,7.1],[1787881980000,7.1],[1787882280000,7.1],[1787882580000,7],[1787882880000,7],[1787883180000,7],[1787883480000,7.2],[1787883780000,7.2],[1787884080000,7.2],[1787884380000,7.1],[1787884680000,7.2],[1787884980000,7.3],[1787885280000,7.2],[1787885580000,7.1],[1787885880000,6.9],[1787886180000,6.9],[1787886480000,6.8],[1787886780000,6.7],[1787887080000,6.5],[1787887380000,6.4],[1787887680000,6.4],[1787887980000,6.5],[1787888280000,6.4],[1787888580000,6.4],[1787888880000,6.4],[1787889180000,6.5],[1787889480000,6.5],[1787889780000,6.6],[1787890080000,6.7],[1787890380000,6.7],[1787890680000,6.9],[1787890980000,7],[1787891280000,7.2],[1787891580000,7.4],[1787891880000,7.6],[1787892180000,7.8],[1787892480000,7.9],[1787892780000,8.1],[1787893080000,8.3],[1787893380000,8.5],[1787893680000,8.6],[1787893980000,8.9],[1787894280000,9.1],[1787894580000,9.3],[1787894880000,9.5],], color: '#5b9f4a' } ]; var options = { xaxes: [{ axisLabel: 'temperature', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1°C' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-temperature-legend' } }; graphs['#chart-temperature'] = $.plot('#chart-temperature', dataset, options); }); $(document).ready(function() { var dataset = [{label: "5 cm nad povrchom (\u00b0C)", data: [[1787868000000,11.80000000],[1787868180000,12.00000000],[1787868480000,11.84000000],[1787868780000,11.92000000],[1787869080000,11.96000000],[1787869380000,12.12000000],[1787869680000,11.76000000],[1787869980000,11.80000000],[1787870280000,11.82000000],[1787870580000,11.66000000],[1787870880000,11.48000000],[1787871180000,11.32000000],[1787871480000,11.22000000],[1787871780000,11.26000000],[1787872080000,11.32000000],[1787872380000,11.18000000],[1787872680000,10.92000000],[1787872980000,10.82000000],[1787873280000,10.72000000],[1787873580000,10.66000000],[1787873880000,10.50000000],[1787874180000,10.42000000],[1787874480000,10.22000000],[1787874780000,10.56000000],[1787875080000,10.40000000],[1787875380000,10.70000000],[1787875680000,10.42000000],[1787875980000,10.22000000],[1787876280000,10.00000000],[1787876580000,9.94000000],[1787876880000,10.00000000],[1787877180000,9.88000000],[1787877480000,9.88000000],[1787877780000,9.68000000],[1787878080000,9.72000000],[1787878380000,9.60000000],[1787878680000,9.56000000],[1787878980000,9.80000000],[1787879280000,9.82000000],[1787879580000,9.70000000],[1787879880000,9.72000000],[1787880180000,9.46000000],[1787880480000,9.34000000],[1787880780000,9.30000000],[1787881080000,9.24000000],[1787881380000,9.22000000],[1787881680000,9.20000000],[1787881980000,9.24000000],[1787882280000,9.18000000],[1787882580000,9.18000000],[1787882880000,9.18000000],[1787883180000,9.08000000],[1787883480000,9.16000000],[1787883780000,9.20000000],[1787884080000,9.28000000],[1787884380000,9.00000000],[1787884680000,9.00000000],[1787884980000,8.92000000],[1787885280000,9.00000000],[1787885580000,8.98000000],[1787885880000,8.90000000],[1787886180000,8.94000000],[1787886480000,8.98000000],[1787886780000,8.68000000],[1787887080000,8.52000000],[1787887380000,8.46000000],[1787887680000,8.20000000],[1787887980000,8.10000000],[1787888280000,8.14000000],[1787888580000,8.30000000],[1787888880000,8.36000000],[1787889180000,8.32000000],[1787889480000,8.50000000],[1787889780000,8.40000000],[1787890080000,8.48000000],[1787890380000,8.76000000],[1787890680000,8.98000000],[1787890980000,9.62000000],[1787891280000,10.08000000],[1787891580000,10.22000000],[1787891880000,10.92000000],[1787892180000,11.38000000],[1787892480000,11.76000000],[1787892780000,12.14000000],[1787893080000,13.32000000],[1787893380000,14.28000000],[1787893680000,14.62000000],[1787893980000,15.52000000],[1787894280000,15.98000000],[1787894580000,16.26000000],[1787894880000,16.60000000],], color: "#f39c12"}]; var options = { points: { show: false }, lines: { show: true, lineWidth: 2, fill: false }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser' }, grid: { hoverable: true, clickable: true, borderWidth: 0 }, tooltip: { show: true, content: '%x - %y.1°C' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-ground-temperature-legend' } }; graphs['#chart-ground-temperature'] = $.plot('#chart-ground-temperature', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1787868000000,69.43333333],[1787868180000,69.66000000],[1787868480000,69.72000000],[1787868780000,70.10000000],[1787869080000,70.20000000],[1787869380000,70.38000000],[1787869680000,70.60000000],[1787869980000,70.66000000],[1787870280000,70.80000000],[1787870580000,71.22000000],[1787870880000,71.60000000],[1787871180000,72.26000000],[1787871480000,72.52000000],[1787871780000,72.50000000],[1787872080000,72.12000000],[1787872380000,71.80000000],[1787872680000,72.04000000],[1787872980000,72.24000000],[1787873280000,72.54000000],[1787873580000,72.76000000],[1787873880000,73.20000000],[1787874180000,73.68000000],[1787874480000,73.96000000],[1787874780000,73.94000000],[1787875080000,74.34000000],[1787875380000,73.94000000],[1787875680000,73.52000000],[1787875980000,73.32000000],[1787876280000,73.60000000],[1787876580000,74.08000000],[1787876880000,74.38000000],[1787877180000,74.78000000],[1787877480000,74.90000000],[1787877780000,75.22000000],[1787878080000,75.28000000],[1787878380000,75.12000000],[1787878680000,74.84000000],[1787878980000,74.92000000],[1787879280000,74.66000000],[1787879580000,75.16000000],[1787879880000,75.66000000],[1787880180000,76.16000000],[1787880480000,76.42000000],[1787880780000,77.14000000],[1787881080000,77.62000000],[1787881380000,77.54000000],[1787881680000,77.56000000],[1787881980000,77.64000000],[1787882280000,77.76000000],[1787882580000,78.50000000],[1787882880000,78.64000000],[1787883180000,79.04000000],[1787883480000,78.98000000],[1787883780000,78.50000000],[1787884080000,78.48000000],[1787884380000,78.28000000],[1787884680000,78.52000000],[1787884980000,77.86000000],[1787885280000,78.20000000],[1787885580000,78.00000000],[1787885880000,77.88000000],[1787886180000,78.10000000],[1787886480000,78.74000000],[1787886780000,78.42000000],[1787887080000,78.02000000],[1787887380000,78.46000000],[1787887680000,78.74000000],[1787887980000,78.50000000],[1787888280000,78.72000000],[1787888580000,79.28000000],[1787888880000,79.66000000],[1787889180000,80.12000000],[1787889480000,80.44000000],[1787889780000,80.98000000],[1787890080000,80.98000000],[1787890380000,80.82000000],[1787890680000,80.56000000],[1787890980000,79.50000000],[1787891280000,79.26000000],[1787891580000,78.94000000],[1787891880000,77.96000000],[1787892180000,77.06000000],[1787892480000,76.32000000],[1787892780000,75.56000000],[1787893080000,74.74000000],[1787893380000,73.92000000],[1787893680000,72.96000000],[1787893980000,72.60000000],[1787894280000,72.32000000],[1787894580000,71.78000000],[1787894880000,71.43333333],], color: '#ff9000' } ]; var options = { xaxes: [{ axisLabel: 'humidity', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1%' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-humidity-legend' } }; graphs['#chart-humidity'] = $.plot('#chart-humidity', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Rýchlosť vetra (km/h)', data: [[1787868000000,2.040000012],[1787868180000,2.016],[1787868480000,1.8],[1787868780000,1.944],[1787869080000,1.944],[1787869380000,1.728],[1787869680000,2.376],[1787869980000,1.512],[1787870280000,1.8],[1787870580000,1.152],[1787870880000,1.512],[1787871180000,1.152],[1787871480000,1.8],[1787871780000,2.376],[1787872080000,2.808],[1787872380000,2.808],[1787872680000,2.448],[1787872980000,1.656],[1787873280000,1.944],[1787873580000,1.296],[1787873880000,2.016],[1787874180000,2.16],[1787874480000,1.512],[1787874780000,1.728],[1787875080000,1.656],[1787875380000,2.304],[1787875680000,2.16],[1787875980000,2.088],[1787876280000,2.592],[1787876580000,1.728],[1787876880000,1.944],[1787877180000,1.728],[1787877480000,1.512],[1787877780000,2.016],[1787878080000,1.728],[1787878380000,2.664],[1787878680000,2.376],[1787878980000,3.024],[1787879280000,2.664],[1787879580000,2.808],[1787879880000,2.016],[1787880180000,1.8],[1787880480000,2.304],[1787880780000,2.376],[1787881080000,1.584],[1787881380000,2.16],[1787881680000,2.52],[1787881980000,1.512],[1787882280000,2.664],[1787882580000,1.8],[1787882880000,2.16],[1787883180000,2.448],[1787883480000,2.448],[1787883780000,1.728],[1787884080000,2.808],[1787884380000,3.024],[1787884680000,4.104],[1787884980000,4.176],[1787885280000,2.664],[1787885580000,2.16],[1787885880000,1.584],[1787886180000,1.368],[1787886480000,1.296],[1787886780000,1.872],[1787887080000,1.224],[1787887380000,1.872],[1787887680000,2.16],[1787887980000,2.376],[1787888280000,1.944],[1787888580000,1.368],[1787888880000,1.728],[1787889180000,1.584],[1787889480000,1.584],[1787889780000,1.728],[1787890080000,1.08],[1787890380000,1.8],[1787890680000,2.232],[1787890980000,2.232],[1787891280000,2.088],[1787891580000,2.16],[1787891880000,3.816],[1787892180000,3.6],[1787892480000,3.888],[1787892780000,3.888],[1787893080000,3.312],[1787893380000,2.88],[1787893680000,3.672],[1787893980000,4.032],[1787894280000,3.672],[1787894580000,5.832],[1787894880000,4.439999988],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787868000000,4.079999988],[1787868180000,4.176],[1787868480000,4.248],[1787868780000,3.528],[1787869080000,4.608],[1787869380000,4.032],[1787869680000,4.608],[1787869980000,2.592],[1787870280000,3.528],[1787870580000,2.376],[1787870880000,2.664],[1787871180000,2.232],[1787871480000,3.312],[1787871780000,5.544],[1787872080000,4.824],[1787872380000,4.752],[1787872680000,4.68],[1787872980000,3.168],[1787873280000,3.816],[1787873580000,3.168],[1787873880000,3.456],[1787874180000,3.744],[1787874480000,2.52],[1787874780000,2.304],[1787875080000,2.808],[1787875380000,3.96],[1787875680000,4.32],[1787875980000,4.248],[1787876280000,4.032],[1787876580000,2.952],[1787876880000,3.528],[1787877180000,3.456],[1787877480000,2.808],[1787877780000,3.672],[1787878080000,3.456],[1787878380000,4.824],[1787878680000,4.104],[1787878980000,6.264],[1787879280000,5.832],[1787879580000,4.608],[1787879880000,3.024],[1787880180000,2.952],[1787880480000,4.824],[1787880780000,4.176],[1787881080000,2.448],[1787881380000,4.968],[1787881680000,4.824],[1787881980000,2.736],[1787882280000,4.32],[1787882580000,2.88],[1787882880000,4.104],[1787883180000,4.968],[1787883480000,4.536],[1787883780000,3.24],[1787884080000,4.824],[1787884380000,5.256],[1787884680000,7.488],[1787884980000,6.048],[1787885280000,4.68],[1787885580000,4.104],[1787885880000,2.448],[1787886180000,2.088],[1787886480000,2.16],[1787886780000,3.24],[1787887080000,2.448],[1787887380000,3.744],[1787887680000,4.824],[1787887980000,4.392],[1787888280000,3.24],[1787888580000,2.232],[1787888880000,3.096],[1787889180000,3.312],[1787889480000,3.6],[1787889780000,3.24],[1787890080000,1.872],[1787890380000,2.808],[1787890680000,3.6],[1787890980000,3.744],[1787891280000,3.24],[1787891580000,3.744],[1787891880000,6.12],[1787892180000,5.184],[1787892480000,6.552],[1787892780000,6.48],[1787893080000,6.84],[1787893380000,4.968],[1787893680000,6.264],[1787893980000,6.048],[1787894280000,5.4],[1787894580000,9.144],[1787894880000,7.679999988],], color: '#EF9856', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind', }], xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1km/h' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-legend' } }; graphs['#chart-wind'] = $.plot('#chart-wind', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Smer vetra', data: [[1787868000000,268.33333333],[1787868180000,262.36000000],[1787868480000,260.74000000],[1787868780000,273.14000000],[1787869080000,277.64000000],[1787869380000,266.88000000],[1787869680000,278.74000000],[1787869980000,269.68000000],[1787870280000,263.14000000],[1787870580000,310.40000000],[1787870880000,281.34000000],[1787871180000,283.94000000],[1787871480000,266.28000000],[1787871780000,276.88000000],[1787872080000,277.34000000],[1787872380000,276.98000000],[1787872680000,279.10000000],[1787872980000,277.96000000],[1787873280000,274.48000000],[1787873580000,263.96000000],[1787873880000,292.56000000],[1787874180000,290.02000000],[1787874480000,283.32000000],[1787874780000,276.14000000],[1787875080000,252.54000000],[1787875380000,249.26000000],[1787875680000,270.80000000],[1787875980000,273.84000000],[1787876280000,280.88000000],[1787876580000,287.80000000],[1787876880000,281.20000000],[1787877180000,279.60000000],[1787877480000,289.92000000],[1787877780000,265.24000000],[1787878080000,267.62000000],[1787878380000,262.44000000],[1787878680000,263.68000000],[1787878980000,271.84000000],[1787879280000,274.04000000],[1787879580000,301.52000000],[1787879880000,322.92000000],[1787880180000,302.24000000],[1787880480000,283.60000000],[1787880780000,298.82000000],[1787881080000,258.84000000],[1787881380000,282.16000000],[1787881680000,286.96000000],[1787881980000,291.60000000],[1787882280000,329.80000000],[1787882580000,316.32000000],[1787882880000,288.30000000],[1787883180000,288.40000000],[1787883480000,268.76000000],[1787883780000,258.92000000],[1787884080000,272.98000000],[1787884380000,291.16000000],[1787884680000,298.16000000],[1787884980000,298.88000000],[1787885280000,286.62000000],[1787885580000,278.72000000],[1787885880000,281.48000000],[1787886180000,78.10000000],[1787886480000,309.86000000],[1787886780000,255.72000000],[1787887080000,249.14000000],[1787887380000,277.12000000],[1787887680000,278.66000000],[1787887980000,278.18000000],[1787888280000,307.32000000],[1787888580000,288.12000000],[1787888880000,263.98000000],[1787889180000,275.16000000],[1787889480000,279.22000000],[1787889780000,276.44000000],[1787890080000,267.04000000],[1787890380000,280.56000000],[1787890680000,279.46000000],[1787890980000,274.44000000],[1787891280000,284.82000000],[1787891580000,289.98000000],[1787891880000,303.82000000],[1787892180000,299.28000000],[1787892480000,295.24000000],[1787892780000,304.36000000],[1787893080000,302.26000000],[1787893380000,305.32000000],[1787893680000,298.42000000],[1787893980000,291.10000000],[1787894280000,298.86000000],[1787894580000,308.16000000],[1787894880000,312.56666667],], color: '#002f80', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind_direction', }], xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, yaxis: { min: 0, max: 360, ticks: [[0, 'S'], [90, 'V'], [180, 'J'], [270, 'Z'], [360, 'S']] }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: function(label, xval, yval, flotItem) { dir = meteo_wind_direction_name(yval); format_date = moment(xval).format('DD.MM., hh:mm') return format_date+' - '+dir; } }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-direction-legend' } }; graphs['#chart-wind-direction'] = $.plot('#chart-wind-direction', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1787868000000,0],[1787868180000,0],[1787868480000,0],[1787868780000,0],[1787869080000,0],[1787869380000,0],[1787869680000,0],[1787869980000,0],[1787870280000,0],[1787870580000,0],[1787870880000,0],[1787871180000,0],[1787871480000,0],[1787871780000,0],[1787872080000,0],[1787872380000,0],[1787872680000,0],[1787872980000,0],[1787873280000,0],[1787873580000,0],[1787873880000,0],[1787874180000,0],[1787874480000,0],[1787874780000,0],[1787875080000,0],[1787875380000,0],[1787875680000,0],[1787875980000,0],[1787876280000,0],[1787876580000,0],[1787876880000,0],[1787877180000,0],[1787877480000,0],[1787877780000,0],[1787878080000,0],[1787878380000,0],[1787878680000,0],[1787878980000,0],[1787879280000,0],[1787879580000,0],[1787879880000,0],[1787880180000,0],[1787880480000,0],[1787880780000,0],[1787881080000,0],[1787881380000,0],[1787881680000,0],[1787881980000,0],[1787882280000,0],[1787882580000,0],[1787882880000,0],[1787883180000,0],[1787883480000,0],[1787883780000,0],[1787884080000,0],[1787884380000,0],[1787884680000,0],[1787884980000,0],[1787885280000,0],[1787885580000,0],[1787885880000,0],[1787886180000,0],[1787886480000,0],[1787886780000,0],[1787887080000,0],[1787887380000,0],[1787887680000,0],[1787887980000,0],[1787888280000,0],[1787888580000,0],[1787888880000,0],[1787889180000,0],[1787889480000,0],[1787889780000,0],[1787890080000,0],[1787890380000,0],[1787890680000,0],[1787890980000,0],[1787891280000,0],[1787891580000,0],[1787891880000,0],[1787892180000,0],[1787892480000,0],[1787892780000,0],[1787893080000,0],[1787893380000,0],[1787893680000,0],[1787893980000,0],[1787894280000,0],[1787894580000,0],[1787894880000,0],], color: '#008fbf' } ]; var options = { xaxes: [{ axisLabel: 'rain', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, yaxis: { min: 0, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.3mm' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-rain-legend' } }; graphs['#chart-rain'] = $.plot('#chart-rain', dataset, options); }); $('.modal').on('hide.bs.modal', function() { var memory = $(this).html(); $(this).html(memory); }); function meteo_wind_direction_name(wind_direction) { if (wind_direction >= 0.00 && wind_direction <= 11.25) { ret = 'S'; } else if (wind_direction > 11.25 && wind_direction <= 33.75) { ret = 'SSV'; } else if (wind_direction > 33.75 && wind_direction <= 56.25) { ret = 'SV'; } else if (wind_direction > 56.25 && wind_direction <= 78.75) { // 67.5 ret = 'VSV'; } else if (wind_direction > 78.75 && wind_direction <= 101.25) { // 90 ret = 'V'; } else if (wind_direction > 101.25 && wind_direction <= 123.75) { //112.5 ret = 'VJV'; } else if (wind_direction > 123.75 && wind_direction <= 146.25) { // 135 ret = 'JV'; } else if (wind_direction > 146.25 && wind_direction <= 168.75) { // 157.5 ret = 'JJV'; } else if (wind_direction > 168.75 && wind_direction <= 191.25) { // 180 ret = 'J'; } else if (wind_direction > 191.25 && wind_direction <= 213.75) { // 202.5 ret = 'JJZ'; } else if (wind_direction > 213.75 && wind_direction <= 236.25) { // 225 ret = 'JZ'; } else if (wind_direction > 236.25 && wind_direction <= 258.75) { // 247.5 ret = 'ZJZ'; } else if (wind_direction > 258.75 && wind_direction <= 281.25) { // 270 ret = 'Z'; } else if (wind_direction > 281.25 && wind_direction <= 303.75) { // 292.5 ret = 'ZSZ'; } else if (wind_direction > 303.75 && wind_direction <= 326.25) { // 315 ret = 'SZ'; } else if (wind_direction > 326.25 && wind_direction <= 348.75) { // 337.5 ret = 'SSZ'; } else if (wind_direction > 348.75 && wind_direction <= 360.0) { // 337.5 ret = 'S'; } else { return ''; } return ret; }