var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787868000000,12.63333333],[1787868180000,12.60000000],[1787868480000,12.56000000],[1787868780000,12.50000000],[1787869080000,12.50000000],[1787869380000,12.50000000],[1787869680000,12.46000000],[1787869980000,12.40000000],[1787870280000,12.34000000],[1787870580000,12.30000000],[1787870880000,12.22000000],[1787871180000,12.16000000],[1787871480000,12.10000000],[1787871780000,12.04000000],[1787872080000,11.98000000],[1787872380000,11.90000000],[1787872680000,11.84000000],[1787872980000,11.80000000],[1787873280000,11.74000000],[1787873580000,11.70000000],[1787873880000,11.70000000],[1787874180000,11.66000000],[1787874480000,11.60000000],[1787874780000,11.60000000],[1787875080000,11.60000000],[1787875380000,11.54000000],[1787875680000,11.46000000],[1787875980000,11.40000000],[1787876280000,11.32000000],[1787876580000,11.30000000],[1787876880000,11.24000000],[1787877180000,11.20000000],[1787877480000,11.12000000],[1787877780000,11.10000000],[1787878080000,11.08000000],[1787878380000,11.00000000],[1787878680000,11.00000000],[1787878980000,10.90000000],[1787879280000,10.88000000],[1787879580000,10.84000000],[1787879880000,10.82000000],[1787880180000,10.80000000],[1787880480000,10.78000000],[1787880780000,10.72000000],[1787881080000,10.70000000],[1787881380000,10.70000000],[1787881680000,10.70000000],[1787881980000,10.64000000],[1787882280000,10.60000000],[1787882580000,10.60000000],[1787882880000,10.60000000],[1787883180000,10.60000000],[1787883480000,10.60000000],[1787883780000,10.60000000],[1787884080000,10.54000000],[1787884380000,10.50000000],[1787884680000,10.44000000],[1787884980000,10.38000000],[1787885280000,10.30000000],[1787885580000,10.30000000],[1787885880000,10.28000000],[1787886180000,10.30000000],[1787886480000,10.30000000],[1787886780000,10.28000000],[1787887080000,10.20000000],[1787887380000,10.20000000],[1787887680000,10.20000000],[1787887980000,10.10000000],[1787888280000,10.08000000],[1787888580000,10.00000000],[1787888880000,10.00000000],[1787889180000,9.90000000],[1787889480000,9.90000000],[1787889780000,9.90000000],[1787890080000,9.86000000],[1787890380000,9.80000000],[1787890680000,9.80000000],[1787890980000,9.88000000],[1787891280000,9.90000000],[1787891580000,9.90000000],[1787891880000,9.96000000],[1787892180000,10.02000000],[1787892480000,10.12000000],[1787892780000,10.24000000],[1787893080000,10.36000000],[1787893380000,10.46000000],[1787893680000,10.54000000],[1787893980000,10.68000000],[1787894280000,11.08000000],[1787894580000,11.36000000],[1787894880000,11.53333333],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787868000000,10.3],[1787868180000,10.3],[1787868480000,10.3],[1787868780000,10.2],[1787869080000,10.2],[1787869380000,10.2],[1787869680000,10.2],[1787869980000,10.1],[1787870280000,10.1],[1787870580000,10.1],[1787870880000,10],[1787871180000,10],[1787871480000,9.9],[1787871780000,9.9],[1787872080000,9.8],[1787872380000,9.8],[1787872680000,9.7],[1787872980000,9.7],[1787873280000,9.6],[1787873580000,9.6],[1787873880000,9.6],[1787874180000,9.6],[1787874480000,9.6],[1787874780000,9.6],[1787875080000,9.6],[1787875380000,9.5],[1787875680000,9.4],[1787875980000,9.4],[1787876280000,9.3],[1787876580000,9.3],[1787876880000,9.2],[1787877180000,9.2],[1787877480000,9.1],[1787877780000,9.1],[1787878080000,9.1],[1787878380000,9],[1787878680000,9],[1787878980000,8.9],[1787879280000,8.9],[1787879580000,8.9],[1787879880000,8.9],[1787880180000,8.8],[1787880480000,8.8],[1787880780000,8.8],[1787881080000,8.7],[1787881380000,8.7],[1787881680000,8.7],[1787881980000,8.7],[1787882280000,8.6],[1787882580000,8.7],[1787882880000,8.7],[1787883180000,8.7],[1787883480000,8.7],[1787883780000,8.7],[1787884080000,8.6],[1787884380000,8.6],[1787884680000,8.5],[1787884980000,8.4],[1787885280000,8.4],[1787885580000,8.4],[1787885880000,8.3],[1787886180000,8.4],[1787886480000,8.4],[1787886780000,8.3],[1787887080000,8.3],[1787887380000,8.3],[1787887680000,8.3],[1787887980000,8.2],[1787888280000,8.1],[1787888580000,8.1],[1787888880000,8],[1787889180000,8],[1787889480000,7.9],[1787889780000,7.9],[1787890080000,7.9],[1787890380000,7.9],[1787890680000,7.9],[1787890980000,7.9],[1787891280000,8],[1787891580000,8],[1787891880000,8],[1787892180000,8.1],[1787892480000,8.2],[1787892780000,8.3],[1787893080000,8.5],[1787893380000,8.6],[1787893680000,8.7],[1787893980000,8.8],[1787894280000,9.1],[1787894580000,9.4],[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,10.96666667],[1787868180000,10.94000000],[1787868480000,10.98000000],[1787868780000,10.94000000],[1787869080000,11.12000000],[1787869380000,11.00000000],[1787869680000,10.94000000],[1787869980000,10.84000000],[1787870280000,10.86000000],[1787870580000,10.78000000],[1787870880000,10.70000000],[1787871180000,10.46000000],[1787871480000,10.62000000],[1787871780000,10.50000000],[1787872080000,10.52000000],[1787872380000,10.46000000],[1787872680000,10.32000000],[1787872980000,10.28000000],[1787873280000,10.30000000],[1787873580000,10.24000000],[1787873880000,10.34000000],[1787874180000,10.12000000],[1787874480000,10.20000000],[1787874780000,10.30000000],[1787875080000,10.10000000],[1787875380000,9.96000000],[1787875680000,9.88000000],[1787875980000,10.00000000],[1787876280000,9.80000000],[1787876580000,9.78000000],[1787876880000,9.80000000],[1787877180000,9.54000000],[1787877480000,9.68000000],[1787877780000,9.66000000],[1787878080000,9.74000000],[1787878380000,9.62000000],[1787878680000,9.66000000],[1787878980000,9.62000000],[1787879280000,9.38000000],[1787879580000,9.52000000],[1787879880000,9.46000000],[1787880180000,9.52000000],[1787880480000,9.64000000],[1787880780000,9.46000000],[1787881080000,9.38000000],[1787881380000,9.46000000],[1787881680000,9.46000000],[1787881980000,9.34000000],[1787882280000,9.36000000],[1787882580000,9.52000000],[1787882880000,9.64000000],[1787883180000,9.52000000],[1787883480000,9.46000000],[1787883780000,9.24000000],[1787884080000,9.16000000],[1787884380000,9.34000000],[1787884680000,9.12000000],[1787884980000,8.92000000],[1787885280000,8.94000000],[1787885580000,8.86000000],[1787885880000,8.92000000],[1787886180000,9.00000000],[1787886480000,8.80000000],[1787886780000,8.74000000],[1787887080000,8.70000000],[1787887380000,8.74000000],[1787887680000,8.70000000],[1787887980000,8.68000000],[1787888280000,8.48000000],[1787888580000,8.62000000],[1787888880000,8.72000000],[1787889180000,8.52000000],[1787889480000,8.50000000],[1787889780000,8.70000000],[1787890080000,8.58000000],[1787890380000,8.72000000],[1787890680000,8.74000000],[1787890980000,8.90000000],[1787891280000,8.94000000],[1787891580000,9.04000000],[1787891880000,9.40000000],[1787892180000,9.88000000],[1787892480000,10.12000000],[1787892780000,10.16000000],[1787893080000,10.22000000],[1787893380000,10.24000000],[1787893680000,10.34000000],[1787893980000,10.60000000],[1787894280000,10.90000000],[1787894580000,11.04000000],[1787894880000,11.10000000],], 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,85.90000000],[1787868180000,85.90000000],[1787868480000,86.04000000],[1787868780000,86.08000000],[1787869080000,85.98000000],[1787869380000,86.00000000],[1787869680000,86.02000000],[1787869980000,86.16000000],[1787870280000,86.24000000],[1787870580000,86.38000000],[1787870880000,86.40000000],[1787871180000,86.56000000],[1787871480000,86.72000000],[1787871780000,86.78000000],[1787872080000,86.78000000],[1787872380000,86.84000000],[1787872680000,87.02000000],[1787872980000,87.08000000],[1787873280000,87.14000000],[1787873580000,87.20000000],[1787873880000,87.26000000],[1787874180000,87.32000000],[1787874480000,87.40000000],[1787874780000,87.46000000],[1787875080000,87.42000000],[1787875380000,87.48000000],[1787875680000,87.48000000],[1787875980000,87.46000000],[1787876280000,87.50000000],[1787876580000,87.54000000],[1787876880000,87.60000000],[1787877180000,87.60000000],[1787877480000,87.66000000],[1787877780000,87.68000000],[1787878080000,87.70000000],[1787878380000,87.66000000],[1787878680000,87.72000000],[1787878980000,87.72000000],[1787879280000,87.72000000],[1787879580000,87.78000000],[1787879880000,87.80000000],[1787880180000,87.80000000],[1787880480000,87.80000000],[1787880780000,87.80000000],[1787881080000,87.80000000],[1787881380000,87.80000000],[1787881680000,87.80000000],[1787881980000,87.84000000],[1787882280000,87.82000000],[1787882580000,87.88000000],[1787882880000,87.90000000],[1787883180000,87.90000000],[1787883480000,87.88000000],[1787883780000,87.92000000],[1787884080000,87.90000000],[1787884380000,87.90000000],[1787884680000,87.90000000],[1787884980000,87.90000000],[1787885280000,87.90000000],[1787885580000,87.90000000],[1787885880000,87.84000000],[1787886180000,87.90000000],[1787886480000,87.90000000],[1787886780000,87.92000000],[1787887080000,87.98000000],[1787887380000,87.98000000],[1787887680000,87.92000000],[1787887980000,87.90000000],[1787888280000,87.90000000],[1787888580000,87.82000000],[1787888880000,87.80000000],[1787889180000,87.82000000],[1787889480000,87.80000000],[1787889780000,87.80000000],[1787890080000,87.80000000],[1787890380000,87.80000000],[1787890680000,87.80000000],[1787890980000,87.80000000],[1787891280000,87.82000000],[1787891580000,87.82000000],[1787891880000,87.88000000],[1787892180000,87.88000000],[1787892480000,87.94000000],[1787892780000,88.02000000],[1787893080000,88.10000000],[1787893380000,88.20000000],[1787893680000,88.22000000],[1787893980000,88.30000000],[1787894280000,88.00000000],[1787894580000,87.72000000],[1787894880000,87.53333333],], 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,0.839999988],[1787868180000,1.368],[1787868480000,1.44],[1787868780000,1.008],[1787869080000,1.296],[1787869380000,1.08],[1787869680000,1.44],[1787869980000,0.72],[1787870280000,1.008],[1787870580000,1.368],[1787870880000,1.008],[1787871180000,1.224],[1787871480000,1.08],[1787871780000,1.224],[1787872080000,1.08],[1787872380000,1.008],[1787872680000,0.36],[1787872980000,0.792],[1787873280000,0.864],[1787873580000,1.152],[1787873880000,1.008],[1787874180000,1.512],[1787874480000,0.72],[1787874780000,1.152],[1787875080000,0.864],[1787875380000,0.648],[1787875680000,0.864],[1787875980000,1.08],[1787876280000,0.792],[1787876580000,0.576],[1787876880000,0.864],[1787877180000,0.72],[1787877480000,0.936],[1787877780000,1.152],[1787878080000,1.008],[1787878380000,0.936],[1787878680000,1.296],[1787878980000,0.936],[1787879280000,1.224],[1787879580000,0.504],[1787879880000,0.576],[1787880180000,0.432],[1787880480000,0.864],[1787880780000,0.936],[1787881080000,0.576],[1787881380000,0.504],[1787881680000,0.72],[1787881980000,0.864],[1787882280000,2.016],[1787882580000,2.016],[1787882880000,1.368],[1787883180000,1.152],[1787883480000,0.576],[1787883780000,0.936],[1787884080000,0.864],[1787884380000,0.576],[1787884680000,0.72],[1787884980000,0.432],[1787885280000,0.864],[1787885580000,1.224],[1787885880000,2.808],[1787886180000,1.224],[1787886480000,1.872],[1787886780000,2.232],[1787887080000,2.16],[1787887380000,1.512],[1787887680000,1.512],[1787887980000,0.432],[1787888280000,0.504],[1787888580000,1.296],[1787888880000,1.08],[1787889180000,1.152],[1787889480000,1.296],[1787889780000,0.936],[1787890080000,0.72],[1787890380000,0.72],[1787890680000,1.008],[1787890980000,1.44],[1787891280000,1.008],[1787891580000,0.864],[1787891880000,0.36],[1787892180000,0.936],[1787892480000,0.792],[1787892780000,1.08],[1787893080000,1.44],[1787893380000,0.648],[1787893680000,0.72],[1787893980000,3.816],[1787894280000,3.96],[1787894580000,1.368],[1787894880000,2.16],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787868000000,1.08],[1787868180000,1.728],[1787868480000,2.016],[1787868780000,1.728],[1787869080000,2.664],[1787869380000,1.512],[1787869680000,2.16],[1787869980000,1.08],[1787870280000,1.368],[1787870580000,1.8],[1787870880000,1.224],[1787871180000,1.8],[1787871480000,1.44],[1787871780000,1.728],[1787872080000,1.512],[1787872380000,1.224],[1787872680000,0.72],[1787872980000,1.08],[1787873280000,1.44],[1787873580000,1.44],[1787873880000,1.368],[1787874180000,2.016],[1787874480000,1.296],[1787874780000,1.656],[1787875080000,1.152],[1787875380000,0.936],[1787875680000,1.368],[1787875980000,1.512],[1787876280000,1.008],[1787876580000,0.792],[1787876880000,1.08],[1787877180000,0.936],[1787877480000,1.224],[1787877780000,1.512],[1787878080000,1.44],[1787878380000,1.296],[1787878680000,1.512],[1787878980000,1.296],[1787879280000,1.584],[1787879580000,1.008],[1787879880000,0.864],[1787880180000,0.72],[1787880480000,1.44],[1787880780000,1.224],[1787881080000,0.936],[1787881380000,0.72],[1787881680000,0.936],[1787881980000,1.368],[1787882280000,3.024],[1787882580000,3.312],[1787882880000,2.016],[1787883180000,1.296],[1787883480000,0.864],[1787883780000,1.512],[1787884080000,1.152],[1787884380000,0.936],[1787884680000,1.008],[1787884980000,0.648],[1787885280000,1.296],[1787885580000,2.088],[1787885880000,3.96],[1787886180000,2.088],[1787886480000,3.096],[1787886780000,2.952],[1787887080000,3.24],[1787887380000,2.16],[1787887680000,2.016],[1787887980000,0.648],[1787888280000,0.648],[1787888580000,1.728],[1787888880000,1.44],[1787889180000,1.512],[1787889480000,1.8],[1787889780000,1.224],[1787890080000,1.008],[1787890380000,1.224],[1787890680000,1.44],[1787890980000,1.872],[1787891280000,1.44],[1787891580000,1.224],[1787891880000,0.576],[1787892180000,1.008],[1787892480000,1.152],[1787892780000,1.872],[1787893080000,2.52],[1787893380000,1.08],[1787893680000,1.008],[1787893980000,6.408],[1787894280000,5.472],[1787894580000,2.16],[1787894880000,4.68],], 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,240.93333333],[1787868180000,317.50000000],[1787868480000,269.26000000],[1787868780000,195.28000000],[1787869080000,161.22000000],[1787869380000,326.18000000],[1787869680000,130.44000000],[1787869980000,215.86000000],[1787870280000,85.84000000],[1787870580000,164.58000000],[1787870880000,83.02000000],[1787871180000,243.06000000],[1787871480000,84.76000000],[1787871780000,27.72000000],[1787872080000,155.92000000],[1787872380000,212.72000000],[1787872680000,174.20000000],[1787872980000,50.48000000],[1787873280000,275.16000000],[1787873580000,277.58000000],[1787873880000,127.10000000],[1787874180000,253.08000000],[1787874480000,265.14000000],[1787874780000,111.06000000],[1787875080000,272.62000000],[1787875380000,142.46000000],[1787875680000,127.48000000],[1787875980000,164.74000000],[1787876280000,322.92000000],[1787876580000,155.24000000],[1787876880000,151.56000000],[1787877180000,164.66000000],[1787877480000,35.64000000],[1787877780000,75.98000000],[1787878080000,18.02000000],[1787878380000,98.24000000],[1787878680000,32.32000000],[1787878980000,90.86000000],[1787879280000,313.06000000],[1787879580000,100.70000000],[1787879880000,91.58000000],[1787880180000,227.06000000],[1787880480000,54.48000000],[1787880780000,144.46000000],[1787881080000,223.44000000],[1787881380000,63.48000000],[1787881680000,152.12000000],[1787881980000,254.12000000],[1787882280000,307.58000000],[1787882580000,321.38000000],[1787882880000,88.50000000],[1787883180000,194.32000000],[1787883480000,211.72000000],[1787883780000,252.82000000],[1787884080000,285.26000000],[1787884380000,242.92000000],[1787884680000,280.42000000],[1787884980000,220.88000000],[1787885280000,158.22000000],[1787885580000,279.70000000],[1787885880000,331.38000000],[1787886180000,296.36000000],[1787886480000,295.04000000],[1787886780000,298.76000000],[1787887080000,304.56000000],[1787887380000,302.38000000],[1787887680000,262.86000000],[1787887980000,220.14000000],[1787888280000,271.62000000],[1787888580000,111.84000000],[1787888880000,46.26000000],[1787889180000,166.56000000],[1787889480000,331.10000000],[1787889780000,43.46000000],[1787890080000,174.84000000],[1787890380000,213.98000000],[1787890680000,181.52000000],[1787890980000,237.44000000],[1787891280000,136.28000000],[1787891580000,323.54000000],[1787891880000,309.84000000],[1787892180000,91.02000000],[1787892480000,198.78000000],[1787892780000,306.94000000],[1787893080000,213.90000000],[1787893380000,201.16000000],[1787893680000,157.76000000],[1787893980000,274.74000000],[1787894280000,273.90000000],[1787894580000,182.74000000],[1787894880000,263.13333333],], 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; }