var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1766444439000,3.30000000],[1766444567000,3.30000000],[1766444887000,3.20000000],[1766445207000,3.20000000],[1766445463000,3.30000000],[1766445783000,3.30000000],[1766446103000,3.30000000],[1766446359000,3.30000000],[1766446679000,3.30000000],[1766446999000,3.30000000],[1766447253000,3.26000000],[1766447575000,3.30000000],[1766447895000,3.30000000],[1766448151000,3.30000000],[1766448472000,3.30000000],[1766448791000,3.20000000],[1766449111000,3.20000000],[1766449367000,3.20000000],[1766449687000,3.24000000],[1766450007000,3.27500000],[1766450263000,3.20000000],[1766450583000,3.20000000],[1766450903000,3.20000000],[1766451159000,3.20000000],[1766451479000,3.20000000],[1766451799000,3.20000000],[1766452053000,3.26000000],[1766452375000,3.30000000],[1766452695000,3.30000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1766444439000,2.9],[1766444567000,2.9],[1766444887000,2.8],[1766445207000,2.7],[1766445463000,2.7],[1766445783000,2.7],[1766446103000,2.7],[1766446359000,2.7],[1766446679000,2.7],[1766446999000,2.7],[1766447253000,2.7],[1766447575000,2.7],[1766447895000,2.7],[1766448151000,2.7],[1766448472000,2.7],[1766448791000,2.6],[1766449111000,2.6],[1766449367000,2.6],[1766449687000,2.7],[1766450007000,2.7],[1766450263000,2.6],[1766450583000,2.6],[1766450903000,2.6],[1766451159000,2.6],[1766451479000,2.6],[1766451799000,2.5],[1766452053000,2.5],[1766452375000,2.4],[1766452695000,2.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() { dataset = [ { label: 'Vlhkosť (%)', data: [[1766444439000,97.00000000],[1766444567000,97.00000000],[1766444887000,97.00000000],[1766445207000,96.25000000],[1766445463000,96.00000000],[1766445783000,96.00000000],[1766446103000,96.00000000],[1766446359000,96.00000000],[1766446679000,96.00000000],[1766446999000,96.00000000],[1766447253000,96.00000000],[1766447575000,96.00000000],[1766447895000,96.00000000],[1766448151000,96.00000000],[1766448472000,96.00000000],[1766448791000,96.00000000],[1766449111000,96.00000000],[1766449367000,96.00000000],[1766449687000,96.00000000],[1766450007000,96.00000000],[1766450263000,96.00000000],[1766450583000,96.00000000],[1766450903000,96.00000000],[1766451159000,96.00000000],[1766451479000,96.00000000],[1766451799000,95.00000000],[1766452053000,95.00000000],[1766452375000,94.20000000],[1766452695000,94.66666667],], 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: 'Atmosférický tlak (hPa)', data: [[1766444439000,1021],[1766444567000,1020.9],[1766444887000,1020.9],[1766445207000,1020.9],[1766445463000,1020.8],[1766445783000,1020.8],[1766446103000,1020.9],[1766446359000,1020.9],[1766446679000,1020.9],[1766446999000,1020.9],[1766447253000,1021],[1766447575000,1020.9],[1766447895000,1021],[1766448151000,1020.9],[1766448472000,1020.9],[1766448791000,1020.8],[1766449111000,1020.9],[1766449367000,1020.8],[1766449687000,1020.7],[1766450007000,1020.7],[1766450263000,1020.8],[1766450583000,1020.8],[1766450903000,1020.6],[1766451159000,1020.7],[1766451479000,1020.8],[1766451799000,1020.8],[1766452053000,1020.8],[1766452375000,1020.7],[1766452695000,1020.7],], color: '#000000' } ]; var options = { xaxes: [{ axisLabel: 'pressure', }], 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.1hPa' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-pressure-legend' } }; graphs['#chart-pressure'] = $.plot('#chart-pressure', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Rýchlosť vetra (km/h)', data: [[1766444439000,11.52],[1766444567000,7.128],[1766444887000,7.488],[1766445207000,8.82],[1766445463000,8.496],[1766445783000,7.776],[1766446103000,8.19],[1766446359000,7.56],[1766446679000,9.432],[1766446999000,8.19],[1766447253000,8.424],[1766447575000,7.704],[1766447895000,7.83],[1766448151000,7.776],[1766448472000,7.56],[1766448791000,9.36],[1766449111000,8.01],[1766449367000,8.208],[1766449687000,9.648],[1766450007000,8.19],[1766450263000,7.632],[1766450583000,7.632],[1766450903000,10.08],[1766451159000,7.992],[1766451479000,10.008],[1766451799000,9.36],[1766452053000,8.568],[1766452375000,8.424],[1766452695000,7.56],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1766444439000,18],[1766444567000,9.216],[1766444887000,9.648],[1766445207000,11.52],[1766445463000,10.728],[1766445783000,10.224],[1766446103000,10.17],[1766446359000,10.152],[1766446679000,13.32],[1766446999000,10.8],[1766447253000,12.312],[1766447575000,9.648],[1766447895000,10.17],[1766448151000,11.736],[1766448472000,8.568],[1766448791000,12.816],[1766449111000,11.52],[1766449367000,10.656],[1766449687000,12.744],[1766450007000,10.89],[1766450263000,10.152],[1766450583000,11.232],[1766450903000,15.48],[1766451159000,10.728],[1766451479000,13.392],[1766451799000,10.8],[1766452053000,11.232],[1766452375000,11.736],[1766452695000,11.16],], 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: [[1766444439000,162.00000000],[1766444567000,140.60000000],[1766444887000,137.80000000],[1766445207000,130.50000000],[1766445463000,153.80000000],[1766445783000,150.00000000],[1766446103000,151.00000000],[1766446359000,168.20000000],[1766446679000,133.00000000],[1766446999000,161.50000000],[1766447253000,143.20000000],[1766447575000,157.40000000],[1766447895000,154.00000000],[1766448151000,143.80000000],[1766448472000,148.40000000],[1766448791000,148.20000000],[1766449111000,154.00000000],[1766449367000,139.00000000],[1766449687000,148.20000000],[1766450007000,144.00000000],[1766450263000,133.40000000],[1766450583000,163.20000000],[1766450903000,149.75000000],[1766451159000,138.80000000],[1766451479000,138.40000000],[1766451799000,145.75000000],[1766452053000,154.60000000],[1766452375000,147.80000000],[1766452695000,162.66666667],], 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: 'Slnečné žiarenie (W/m2)', data: [[1766444439000,0.00000000],[1766444567000,0.00000000],[1766444887000,0.00000000],[1766445207000,0.00000000],[1766445463000,0.00000000],[1766445783000,0.00000000],[1766446103000,0.00000000],[1766446359000,0.00000000],[1766446679000,0.00000000],[1766446999000,0.00000000],[1766447253000,0.00000000],[1766447575000,0.00000000],[1766447895000,0.00000000],[1766448151000,0.00000000],[1766448472000,0.00000000],[1766448791000,0.00000000],[1766449111000,0.00000000],[1766449367000,0.00000000],[1766449687000,0.00000000],[1766450007000,0.00000000],[1766450263000,0.00000000],[1766450583000,0.00000000],[1766450903000,0.00000000],[1766451159000,0.00000000],[1766451479000,0.00000000],[1766451799000,0.00000000],[1766452053000,0.00000000],[1766452375000,0.00000000],[1766452695000,0.00000000],], color: '#ffb92f' } ]; var options = { xaxes: [{ axisLabel: 'solar_radiation', }], 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.1W/m2' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-solar-radiation-legend' } }; graphs['#chart-solar-radiation'] = $.plot('#chart-solar-radiation', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'UV žiarenie', data: [[1766444439000,0.00000000],[1766444567000,0.00000000],[1766444887000,0.00000000],[1766445207000,0.00000000],[1766445463000,0.00000000],[1766445783000,0.00000000],[1766446103000,0.00000000],[1766446359000,0.00000000],[1766446679000,0.00000000],[1766446999000,0.00000000],[1766447253000,0.00000000],[1766447575000,0.00000000],[1766447895000,0.00000000],[1766448151000,0.00000000],[1766448472000,0.00000000],[1766448791000,0.00000000],[1766449111000,0.00000000],[1766449367000,0.00000000],[1766449687000,0.00000000],[1766450007000,0.00000000],[1766450263000,0.00000000],[1766450583000,0.00000000],[1766450903000,0.00000000],[1766451159000,0.00000000],[1766451479000,0.00000000],[1766451799000,0.00000000],[1766452053000,0.00000000],[1766452375000,0.00000000],[1766452695000,0.00000000],], color: '#802674' } ]; var options = { xaxes: [{ axisLabel: 'uv', }], 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.0' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-uv-legend' } }; graphs['#chart-uv'] = $.plot('#chart-uv', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1766444439000,0.00000000],[1766444567000,0.00000000],[1766444887000,0.00000000],[1766445207000,0.00000000],[1766445463000,0.00000000],[1766445783000,0.00000000],[1766446103000,0.00000000],[1766446359000,0.00000000],[1766446679000,0.00000000],[1766446999000,0.00000000],[1766447253000,0.00000000],[1766447575000,0.00000000],[1766447895000,0.00000000],[1766448151000,0.00000000],[1766448472000,0.00000000],[1766448791000,0.00000000],[1766449111000,0.00000000],[1766449367000,0.00000000],[1766449687000,0.00000000],[1766450007000,0.00000000],[1766450263000,0.00000000],[1766450583000,0.00000000],[1766450903000,0.00000000],[1766451159000,0.00000000],[1766451479000,0.00000000],[1766451799000,0.00000000],[1766452053000,0.00000000],[1766452375000,0.00000000],[1766452695000,0.00000000],], 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; }