var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,11.40000000],[1787954580000,11.54000000],[1787954880000,11.50000000],[1787955180000,11.50000000],[1787955480000,11.62000000],[1787955780000,12.00000000],[1787956080000,11.92000000],[1787956380000,11.96000000],[1787956680000,11.94000000],[1787956980000,12.42000000],[1787957280000,12.14000000],[1787957580000,12.08000000],[1787957880000,11.88000000],[1787958180000,11.84000000],[1787958480000,11.84000000],[1787958780000,11.88000000],[1787959080000,11.90000000],[1787959380000,11.88000000],[1787959680000,11.92000000],[1787959980000,11.90000000],[1787960280000,11.92000000],[1787960580000,12.00000000],[1787960880000,12.00000000],[1787961180000,11.90000000],[1787961480000,11.80000000],[1787961780000,12.00000000],[1787962080000,12.00000000],[1787962380000,12.08000000],[1787962680000,12.00000000],[1787962980000,11.98000000],[1787963280000,12.14000000],[1787963580000,12.04000000],[1787963880000,11.90000000],[1787964180000,11.98000000],[1787964480000,12.30000000],[1787964780000,12.24000000],[1787965080000,12.16000000],[1787965380000,12.16000000],[1787965680000,12.10000000],[1787965980000,12.06000000],[1787966280000,12.16000000],[1787966580000,12.14000000],[1787966880000,12.26000000],[1787967180000,12.20000000],[1787967480000,12.34000000],[1787967780000,12.40000000],[1787968080000,12.40000000],[1787968380000,12.40000000],[1787968680000,12.44000000],[1787968980000,12.84000000],[1787969280000,13.08000000],[1787969580000,13.20000000],[1787969880000,13.34000000],[1787970180000,13.24000000],[1787970480000,13.30000000],[1787970780000,13.40000000],[1787971080000,13.34000000],[1787971380000,13.14000000],[1787971680000,13.44000000],[1787971980000,13.64000000],[1787972280000,15.16000000],[1787972580000,15.98000000],[1787972880000,16.14000000],[1787973180000,16.02000000],[1787973480000,15.48000000],[1787973780000,15.30000000],[1787974080000,15.24000000],[1787974380000,15.30000000],[1787974680000,15.38000000],[1787974980000,15.56000000],[1787975280000,15.64000000],[1787975580000,15.40000000],[1787975880000,15.00000000],[1787976180000,14.60000000],[1787976480000,14.68000000],[1787976780000,14.66000000],[1787977080000,14.90000000],[1787977380000,14.80000000],[1787977680000,14.70000000],[1787977980000,14.87500000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,10.2],[1787954580000,10.3],[1787954880000,10.2],[1787955180000,10.3],[1787955480000,10.4],[1787955780000,10.5],[1787956080000,10.5],[1787956380000,10.5],[1787956680000,10.5],[1787956980000,10.9],[1787957280000,10.4],[1787957580000,10.6],[1787957880000,10.4],[1787958180000,10.5],[1787958480000,10.5],[1787958780000,10.6],[1787959080000,10.6],[1787959380000,10.6],[1787959680000,10.6],[1787959980000,10.5],[1787960280000,10.6],[1787960580000,10.7],[1787960880000,10.7],[1787961180000,10.6],[1787961480000,10.6],[1787961780000,10.9],[1787962080000,10.8],[1787962380000,10.7],[1787962680000,10.7],[1787962980000,10.8],[1787963280000,10.9],[1787963580000,10.7],[1787963880000,10.7],[1787964180000,10.8],[1787964480000,11.1],[1787964780000,10.9],[1787965080000,10.9],[1787965380000,10.9],[1787965680000,10.9],[1787965980000,10.9],[1787966280000,11],[1787966580000,11],[1787966880000,11.1],[1787967180000,11],[1787967480000,11.2],[1787967780000,11.1],[1787968080000,11.1],[1787968380000,11.1],[1787968680000,11.1],[1787968980000,11.1],[1787969280000,11.2],[1787969580000,11.1],[1787969880000,11.2],[1787970180000,11.2],[1787970480000,11],[1787970780000,11],[1787971080000,11.1],[1787971380000,11.1],[1787971680000,10.9],[1787971980000,11.1],[1787972280000,10.4],[1787972580000,10.3],[1787972880000,10.2],[1787973180000,10.5],[1787973480000,10.5],[1787973780000,10.6],[1787974080000,10.5],[1787974380000,10.7],[1787974680000,10.4],[1787974980000,10.3],[1787975280000,10.5],[1787975580000,11],[1787975880000,11.2],[1787976180000,11.1],[1787976480000,10.8],[1787976780000,10.7],[1787977080000,10.6],[1787977380000,10.7],[1787977680000,10.3],[1787977980000,10.3],], 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() { dataset = [ { label: 'Vlhkosť (%)', data: [[1787954400000,92.50000000],[1787954580000,92.40000000],[1787954880000,92.10000000],[1787955180000,92.20000000],[1787955480000,92.08000000],[1787955780000,90.58000000],[1787956080000,91.18000000],[1787956380000,90.72000000],[1787956680000,91.16000000],[1787956980000,90.32000000],[1787957280000,89.42000000],[1787957580000,90.86000000],[1787957880000,90.54000000],[1787958180000,91.42000000],[1787958480000,91.58000000],[1787958780000,91.82000000],[1787959080000,92.02000000],[1787959380000,92.06000000],[1787959680000,91.48000000],[1787959980000,91.46000000],[1787960280000,91.60000000],[1787960580000,91.74000000],[1787960880000,91.84000000],[1787961180000,92.10000000],[1787961480000,92.30000000],[1787961780000,92.84000000],[1787962080000,92.20000000],[1787962380000,91.60000000],[1787962680000,91.94000000],[1787962980000,92.38000000],[1787963280000,92.38000000],[1787963580000,91.52000000],[1787963880000,92.24000000],[1787964180000,92.64000000],[1787964480000,92.18000000],[1787964780000,91.76000000],[1787965080000,92.30000000],[1787965380000,92.34000000],[1787965680000,92.50000000],[1787965980000,92.80000000],[1787966280000,92.62000000],[1787966580000,92.82000000],[1787966880000,92.80000000],[1787967180000,92.54000000],[1787967480000,92.62000000],[1787967780000,92.02000000],[1787968080000,91.88000000],[1787968380000,91.90000000],[1787968680000,91.50000000],[1787968980000,89.24000000],[1787969280000,88.26000000],[1787969580000,87.02000000],[1787969880000,87.20000000],[1787970180000,87.52000000],[1787970480000,86.36000000],[1787970780000,85.74000000],[1787971080000,86.56000000],[1787971380000,87.68000000],[1787971680000,84.78000000],[1787971980000,84.72000000],[1787972280000,73.24000000],[1787972580000,69.32000000],[1787972880000,68.28000000],[1787973180000,69.84000000],[1787973480000,72.64000000],[1787973780000,73.64000000],[1787974080000,73.66000000],[1787974380000,74.36000000],[1787974680000,72.40000000],[1787974980000,71.30000000],[1787975280000,71.88000000],[1787975580000,75.10000000],[1787975880000,78.16000000],[1787976180000,79.52000000],[1787976480000,77.78000000],[1787976780000,77.10000000],[1787977080000,75.64000000],[1787977380000,76.52000000],[1787977680000,75.24000000],[1787977980000,74.22500000],], 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: [[1787954400000,7.440000012],[1787954580000,5.184],[1787954880000,4.68],[1787955180000,7.272],[1787955480000,6.84],[1787955780000,7.704],[1787956080000,5.688],[1787956380000,5.688],[1787956680000,3.888],[1787956980000,3.816],[1787957280000,3.384],[1787957580000,4.536],[1787957880000,4.248],[1787958180000,3.456],[1787958480000,1.8],[1787958780000,3.312],[1787959080000,3.456],[1787959380000,3.24],[1787959680000,3.456],[1787959980000,1.512],[1787960280000,1.872],[1787960580000,3.384],[1787960880000,2.232],[1787961180000,2.376],[1787961480000,4.176],[1787961780000,5.76],[1787962080000,5.4],[1787962380000,4.464],[1787962680000,3.888],[1787962980000,3.744],[1787963280000,3.816],[1787963580000,3.456],[1787963880000,3.456],[1787964180000,4.824],[1787964480000,4.464],[1787964780000,3.312],[1787965080000,2.88],[1787965380000,2.52],[1787965680000,2.952],[1787965980000,1.224],[1787966280000,2.664],[1787966580000,4.536],[1787966880000,5.328],[1787967180000,7.128],[1787967480000,4.536],[1787967780000,5.616],[1787968080000,7.272],[1787968380000,4.464],[1787968680000,6.12],[1787968980000,5.184],[1787969280000,4.32],[1787969580000,4.464],[1787969880000,4.536],[1787970180000,5.76],[1787970480000,4.536],[1787970780000,6.624],[1787971080000,8.064],[1787971380000,8.784],[1787971680000,5.328],[1787971980000,9.792],[1787972280000,6.48],[1787972580000,6.192],[1787972880000,4.68],[1787973180000,6.624],[1787973480000,5.112],[1787973780000,3.24],[1787974080000,2.952],[1787974380000,3.456],[1787974680000,2.736],[1787974980000,3.312],[1787975280000,2.664],[1787975580000,3.312],[1787975880000,4.68],[1787976180000,2.304],[1787976480000,3.6],[1787976780000,2.88],[1787977080000,2.448],[1787977380000,2.88],[1787977680000,1.872],[1787977980000,1.62],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,9.600000012],[1787954580000,7.128],[1787954880000,6.624],[1787955180000,8.856],[1787955480000,8.928],[1787955780000,9.792],[1787956080000,7.704],[1787956380000,7.2],[1787956680000,5.76],[1787956980000,5.472],[1787957280000,4.824],[1787957580000,6.696],[1787957880000,6.048],[1787958180000,5.976],[1787958480000,2.88],[1787958780000,4.176],[1787959080000,4.824],[1787959380000,4.248],[1787959680000,5.184],[1787959980000,2.304],[1787960280000,2.52],[1787960580000,4.248],[1787960880000,3.168],[1787961180000,3.384],[1787961480000,5.328],[1787961780000,7.92],[1787962080000,7.416],[1787962380000,6.12],[1787962680000,5.04],[1787962980000,5.184],[1787963280000,6.12],[1787963580000,4.608],[1787963880000,4.752],[1787964180000,6.984],[1787964480000,6.408],[1787964780000,4.464],[1787965080000,4.032],[1787965380000,3.816],[1787965680000,3.888],[1787965980000,1.872],[1787966280000,3.816],[1787966580000,6.48],[1787966880000,7.56],[1787967180000,9.864],[1787967480000,7.488],[1787967780000,9.36],[1787968080000,11.16],[1787968380000,7.56],[1787968680000,9],[1787968980000,7.632],[1787969280000,6.48],[1787969580000,6.192],[1787969880000,6.336],[1787970180000,8.064],[1787970480000,7.92],[1787970780000,8.712],[1787971080000,10.656],[1787971380000,12.744],[1787971680000,8.424],[1787971980000,16.2],[1787972280000,12.528],[1787972580000,12.312],[1787972880000,8.928],[1787973180000,10.08],[1787973480000,8.352],[1787973780000,5.112],[1787974080000,4.608],[1787974380000,5.112],[1787974680000,4.68],[1787974980000,4.392],[1787975280000,4.104],[1787975580000,4.32],[1787975880000,6.12],[1787976180000,3.96],[1787976480000,5.616],[1787976780000,5.472],[1787977080000,4.464],[1787977380000,4.824],[1787977680000,3.888],[1787977980000,4.86],], 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: [[1787954400000,145.80000000],[1787954580000,165.16000000],[1787954880000,161.68000000],[1787955180000,152.38000000],[1787955480000,137.92000000],[1787955780000,165.56000000],[1787956080000,154.46000000],[1787956380000,147.04000000],[1787956680000,129.18000000],[1787956980000,173.44000000],[1787957280000,171.06000000],[1787957580000,165.32000000],[1787957880000,165.22000000],[1787958180000,182.26000000],[1787958480000,120.30000000],[1787958780000,144.44000000],[1787959080000,202.18000000],[1787959380000,138.08000000],[1787959680000,157.26000000],[1787959980000,159.56000000],[1787960280000,132.36000000],[1787960580000,271.80000000],[1787960880000,277.16000000],[1787961180000,196.16000000],[1787961480000,135.70000000],[1787961780000,142.46000000],[1787962080000,143.64000000],[1787962380000,128.50000000],[1787962680000,259.96000000],[1787962980000,117.44000000],[1787963280000,131.48000000],[1787963580000,198.76000000],[1787963880000,162.66000000],[1787964180000,154.62000000],[1787964480000,111.16000000],[1787964780000,220.64000000],[1787965080000,153.28000000],[1787965380000,271.26000000],[1787965680000,149.40000000],[1787965980000,58.64000000],[1787966280000,161.80000000],[1787966580000,97.76000000],[1787966880000,304.24000000],[1787967180000,210.74000000],[1787967480000,210.40000000],[1787967780000,193.90000000],[1787968080000,254.70000000],[1787968380000,268.92000000],[1787968680000,212.96000000],[1787968980000,189.36000000],[1787969280000,198.12000000],[1787969580000,139.76000000],[1787969880000,266.34000000],[1787970180000,278.10000000],[1787970480000,307.52000000],[1787970780000,334.38000000],[1787971080000,333.52000000],[1787971380000,344.16000000],[1787971680000,201.26000000],[1787971980000,278.30000000],[1787972280000,140.72000000],[1787972580000,103.00000000],[1787972880000,174.82000000],[1787973180000,337.22000000],[1787973480000,341.46000000],[1787973780000,281.68000000],[1787974080000,200.98000000],[1787974380000,235.90000000],[1787974680000,317.12000000],[1787974980000,144.38000000],[1787975280000,230.02000000],[1787975580000,309.26000000],[1787975880000,336.40000000],[1787976180000,245.84000000],[1787976480000,278.36000000],[1787976780000,291.66000000],[1787977080000,269.08000000],[1787977380000,325.62000000],[1787977680000,323.02000000],[1787977980000,298.05000000],], 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); }); $('.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; }