var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787954400000,10.00000000],[1787954580000,9.92000000],[1787954880000,9.86000000],[1787955180000,10.00000000],[1787955480000,10.00000000],[1787955780000,10.00000000],[1787956080000,10.00000000],[1787956380000,10.10000000],[1787956680000,10.24000000],[1787956980000,10.30000000],[1787957280000,10.26000000],[1787957580000,10.14000000],[1787957880000,10.10000000],[1787958180000,10.00000000],[1787958480000,10.08000000],[1787958780000,10.02000000],[1787959080000,9.58000000],[1787959380000,9.36000000],[1787959680000,9.16000000],[1787959980000,9.00000000],[1787960280000,8.84000000],[1787960580000,8.70000000],[1787960880000,8.66000000],[1787961180000,8.64000000],[1787961480000,8.60000000],[1787961780000,8.54000000],[1787962080000,8.44000000],[1787962380000,8.36000000],[1787962680000,8.30000000],[1787962980000,8.30000000],[1787963280000,8.16000000],[1787963580000,8.08000000],[1787963880000,7.98000000],[1787964180000,8.00000000],[1787964480000,8.10000000],[1787964780000,8.00000000],[1787965080000,7.84000000],[1787965380000,7.68000000],[1787965680000,7.68000000],[1787965980000,7.62000000],[1787966280000,7.64000000],[1787966580000,7.66000000],[1787966880000,7.78000000],[1787967180000,7.78000000],[1787967480000,7.90000000],[1787967780000,8.26000000],[1787968080000,8.34000000],[1787968380000,8.30000000],[1787968680000,8.24000000],[1787968980000,8.18000000],[1787969280000,7.98000000],[1787969580000,8.08000000],[1787969880000,8.02000000],[1787970180000,7.96000000],[1787970480000,8.00000000],[1787970780000,8.04000000],[1787971080000,8.08000000],[1787971380000,8.02000000],[1787971680000,7.90000000],[1787971980000,7.86000000],[1787972280000,7.98000000],[1787972580000,8.00000000],[1787972880000,8.02000000],[1787973180000,8.06000000],[1787973480000,8.10000000],[1787973780000,8.10000000],[1787974080000,8.10000000],[1787974380000,8.10000000],[1787974680000,8.12000000],[1787974980000,8.16000000],[1787975280000,8.16000000],[1787975580000,8.06000000],[1787975880000,7.92000000],[1787976180000,7.94000000],[1787976480000,7.98000000],[1787976780000,8.02000000],[1787977080000,8.00000000],[1787977380000,8.10000000],[1787977680000,8.12000000],[1787977980000,8.20000000],[1787978280000,8.20000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787954400000,10],[1787954580000,9.9],[1787954880000,9.6],[1787955180000,9.9],[1787955480000,10],[1787955780000,10],[1787956080000,9.9],[1787956380000,9.5],[1787956680000,7.4],[1787956980000,9.5],[1787957280000,10.3],[1787957580000,10.1],[1787957880000,9.5],[1787958180000,9.9],[1787958480000,9.9],[1787958780000,10],[1787959080000,9.6],[1787959380000,9.4],[1787959680000,9.2],[1787959980000,9],[1787960280000,8.8],[1787960580000,8.7],[1787960880000,8.7],[1787961180000,8.6],[1787961480000,8.6],[1787961780000,8.5],[1787962080000,8.4],[1787962380000,8.4],[1787962680000,8.3],[1787962980000,8.3],[1787963280000,8.2],[1787963580000,8.1],[1787963880000,8],[1787964180000,8],[1787964480000,8.1],[1787964780000,8],[1787965080000,7.8],[1787965380000,7.7],[1787965680000,7.7],[1787965980000,7.6],[1787966280000,7.6],[1787966580000,7.7],[1787966880000,7.8],[1787967180000,7.8],[1787967480000,7.9],[1787967780000,8.3],[1787968080000,8.3],[1787968380000,8.3],[1787968680000,8.2],[1787968980000,8.2],[1787969280000,8],[1787969580000,8.1],[1787969880000,8],[1787970180000,8],[1787970480000,8],[1787970780000,8],[1787971080000,8.1],[1787971380000,8],[1787971680000,7.9],[1787971980000,7.9],[1787972280000,8],[1787972580000,8],[1787972880000,8],[1787973180000,8.1],[1787973480000,8.1],[1787973780000,8.1],[1787974080000,8.1],[1787974380000,8.1],[1787974680000,8.1],[1787974980000,8.2],[1787975280000,8.2],[1787975580000,8.1],[1787975880000,7.9],[1787976180000,7.9],[1787976480000,8],[1787976780000,8],[1787977080000,8],[1787977380000,8.1],[1787977680000,8.1],[1787977980000,8.2],[1787978280000,8.2],], 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,100.00000000],[1787954580000,100.00000000],[1787954880000,98.06000000],[1787955180000,99.02000000],[1787955480000,100.00000000],[1787955780000,100.00000000],[1787956080000,99.18000000],[1787956380000,96.42000000],[1787956680000,82.74000000],[1787956980000,94.84000000],[1787957280000,99.98000000],[1787957580000,99.78000000],[1787957880000,95.96000000],[1787958180000,99.34000000],[1787958480000,98.98000000],[1787958780000,99.88000000],[1787959080000,100.00000000],[1787959380000,100.00000000],[1787959680000,100.00000000],[1787959980000,100.00000000],[1787960280000,100.00000000],[1787960580000,100.00000000],[1787960880000,100.00000000],[1787961180000,100.00000000],[1787961480000,100.00000000],[1787961780000,100.00000000],[1787962080000,100.00000000],[1787962380000,100.00000000],[1787962680000,100.00000000],[1787962980000,100.00000000],[1787963280000,100.00000000],[1787963580000,100.00000000],[1787963880000,100.00000000],[1787964180000,100.00000000],[1787964480000,100.00000000],[1787964780000,100.00000000],[1787965080000,100.00000000],[1787965380000,100.00000000],[1787965680000,100.00000000],[1787965980000,100.00000000],[1787966280000,100.00000000],[1787966580000,100.00000000],[1787966880000,100.00000000],[1787967180000,100.00000000],[1787967480000,100.00000000],[1787967780000,100.00000000],[1787968080000,100.00000000],[1787968380000,100.00000000],[1787968680000,100.00000000],[1787968980000,100.00000000],[1787969280000,100.00000000],[1787969580000,100.00000000],[1787969880000,100.00000000],[1787970180000,100.00000000],[1787970480000,100.00000000],[1787970780000,100.00000000],[1787971080000,100.00000000],[1787971380000,100.00000000],[1787971680000,100.00000000],[1787971980000,100.00000000],[1787972280000,100.00000000],[1787972580000,100.00000000],[1787972880000,100.00000000],[1787973180000,100.00000000],[1787973480000,100.00000000],[1787973780000,100.00000000],[1787974080000,100.00000000],[1787974380000,100.00000000],[1787974680000,100.00000000],[1787974980000,100.00000000],[1787975280000,100.00000000],[1787975580000,100.00000000],[1787975880000,100.00000000],[1787976180000,100.00000000],[1787976480000,100.00000000],[1787976780000,100.00000000],[1787977080000,100.00000000],[1787977380000,100.00000000],[1787977680000,100.00000000],[1787977980000,100.00000000],[1787978280000,100.00000000],], 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,8.880000012],[1787954580000,20.808],[1787954880000,21.24],[1787955180000,19.8],[1787955480000,22.752],[1787955780000,17.568],[1787956080000,16.776],[1787956380000,14.976],[1787956680000,13.752],[1787956980000,20.88],[1787957280000,14.184],[1787957580000,11.52],[1787957880000,22.536],[1787958180000,31.752],[1787958480000,33.336],[1787958780000,34.704],[1787959080000,29.016],[1787959380000,31.968],[1787959680000,19.8],[1787959980000,17.568],[1787960280000,17.208],[1787960580000,15.408],[1787960880000,16.704],[1787961180000,15.48],[1787961480000,11.304],[1787961780000,15.192],[1787962080000,15.624],[1787962380000,12.744],[1787962680000,11.376],[1787962980000,11.16],[1787963280000,12.6],[1787963580000,13.32],[1787963880000,11.448],[1787964180000,13.536],[1787964480000,12.528],[1787964780000,15.48],[1787965080000,15.408],[1787965380000,15.552],[1787965680000,12.96],[1787965980000,14.976],[1787966280000,11.232],[1787966580000,15.552],[1787966880000,12.312],[1787967180000,12.888],[1787967480000,14.256],[1787967780000,17.352],[1787968080000,18.432],[1787968380000,19.224],[1787968680000,18.144],[1787968980000,20.88],[1787969280000,15.912],[1787969580000,21.096],[1787969880000,23.328],[1787970180000,21.888],[1787970480000,20.304],[1787970780000,23.04],[1787971080000,18.792],[1787971380000,16.2],[1787971680000,13.608],[1787971980000,16.632],[1787972280000,19.008],[1787972580000,13.248],[1787972880000,17.856],[1787973180000,15.192],[1787973480000,24.12],[1787973780000,14.112],[1787974080000,15.552],[1787974380000,22.68],[1787974680000,18.288],[1787974980000,11.664],[1787975280000,21.888],[1787975580000,16.632],[1787975880000,16.92],[1787976180000,16.704],[1787976480000,18.864],[1787976780000,16.416],[1787977080000,16.848],[1787977380000,16.56],[1787977680000,20.448],[1787977980000,12.888],[1787978280000,6.84],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787954400000,17.520000012],[1787954580000,27.144],[1787954880000,26.64],[1787955180000,26.28],[1787955480000,28.872],[1787955780000,23.472],[1787956080000,21.672],[1787956380000,17.928],[1787956680000,15.912],[1787956980000,26.208],[1787957280000,20.88],[1787957580000,22.392],[1787957880000,29.448],[1787958180000,36.432],[1787958480000,38.304],[1787958780000,41.904],[1787959080000,41.544],[1787959380000,48.816],[1787959680000,34.488],[1787959980000,32.976],[1787960280000,34.056],[1787960580000,30.96],[1787960880000,34.632],[1787961180000,25.776],[1787961480000,20.664],[1787961780000,25.92],[1787962080000,21.168],[1787962380000,27.072],[1787962680000,20.664],[1787962980000,18.864],[1787963280000,21.528],[1787963580000,19.08],[1787963880000,23.256],[1787964180000,28.224],[1787964480000,26.352],[1787964780000,32.688],[1787965080000,27.648],[1787965380000,26.208],[1787965680000,26.28],[1787965980000,26.496],[1787966280000,21.312],[1787966580000,27.36],[1787966880000,20.016],[1787967180000,20.592],[1787967480000,24.192],[1787967780000,30.456],[1787968080000,35.424],[1787968380000,36.72],[1787968680000,35.136],[1787968980000,34.92],[1787969280000,30.24],[1787969580000,36.576],[1787969880000,36.792],[1787970180000,34.992],[1787970480000,34.128],[1787970780000,39.456],[1787971080000,34.992],[1787971380000,35.208],[1787971680000,24.192],[1787971980000,33.336],[1787972280000,30.168],[1787972580000,21.96],[1787972880000,33.408],[1787973180000,29.448],[1787973480000,46.008],[1787973780000,30.096],[1787974080000,30.528],[1787974380000,43.776],[1787974680000,32.544],[1787974980000,22.464],[1787975280000,37.872],[1787975580000,31.68],[1787975880000,31.752],[1787976180000,30.816],[1787976480000,39.384],[1787976780000,28.872],[1787977080000,28.584],[1787977380000,29.232],[1787977680000,33.912],[1787977980000,23.976],[1787978280000,19.08],], 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,274.96666667],[1787954580000,234.70000000],[1787954880000,237.98000000],[1787955180000,229.22000000],[1787955480000,237.30000000],[1787955780000,231.74000000],[1787956080000,223.34000000],[1787956380000,225.58000000],[1787956680000,240.52000000],[1787956980000,247.40000000],[1787957280000,252.32000000],[1787957580000,266.26000000],[1787957880000,222.44000000],[1787958180000,229.70000000],[1787958480000,230.14000000],[1787958780000,233.98000000],[1787959080000,223.86000000],[1787959380000,238.44000000],[1787959680000,240.68000000],[1787959980000,257.30000000],[1787960280000,281.56000000],[1787960580000,296.16000000],[1787960880000,276.82000000],[1787961180000,264.52000000],[1787961480000,201.28000000],[1787961780000,319.82000000],[1787962080000,265.22000000],[1787962380000,290.04000000],[1787962680000,212.46000000],[1787962980000,266.84000000],[1787963280000,302.70000000],[1787963580000,335.20000000],[1787963880000,279.46000000],[1787964180000,202.42000000],[1787964480000,232.40000000],[1787964780000,207.98000000],[1787965080000,215.60000000],[1787965380000,287.34000000],[1787965680000,313.66000000],[1787965980000,278.80000000],[1787966280000,319.86000000],[1787966580000,233.16000000],[1787966880000,345.82000000],[1787967180000,220.12000000],[1787967480000,222.34000000],[1787967780000,246.36000000],[1787968080000,304.90000000],[1787968380000,303.82000000],[1787968680000,277.98000000],[1787968980000,254.02000000],[1787969280000,283.76000000],[1787969580000,252.28000000],[1787969880000,244.14000000],[1787970180000,271.24000000],[1787970480000,203.92000000],[1787970780000,241.62000000],[1787971080000,208.04000000],[1787971380000,266.82000000],[1787971680000,319.60000000],[1787971980000,317.24000000],[1787972280000,288.62000000],[1787972580000,329.42000000],[1787972880000,250.12000000],[1787973180000,296.52000000],[1787973480000,268.76000000],[1787973780000,300.78000000],[1787974080000,312.86000000],[1787974380000,271.36000000],[1787974680000,281.52000000],[1787974980000,284.78000000],[1787975280000,263.52000000],[1787975580000,295.76000000],[1787975880000,280.02000000],[1787976180000,266.56000000],[1787976480000,258.62000000],[1787976780000,269.68000000],[1787977080000,276.10000000],[1787977380000,258.34000000],[1787977680000,240.90000000],[1787977980000,240.90000000],[1787978280000,254.80000000],], 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; }