var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092540000,19.70000000],[1786092780000,19.76000000],[1786093080000,19.78000000],[1786093380000,19.70000000],[1786093680000,19.70000000],[1786093980000,19.78000000],[1786094280000,19.84000000],[1786094580000,20.08000000],[1786094880000,20.42000000],[1786095180000,20.74000000],[1786095480000,20.80000000],[1786095780000,20.68000000],[1786096080000,20.48000000],[1786096380000,20.26000000],[1786096680000,20.14000000],[1786096980000,20.14000000],[1786097280000,20.04000000],[1786097580000,20.00000000],[1786097880000,20.00000000],[1786098180000,20.02000000],[1786098480000,20.10000000],[1786098780000,20.06000000],[1786099080000,20.00000000],[1786099380000,20.12000000],[1786099680000,20.40000000],[1786099980000,20.68000000],[1786100280000,20.90000000],[1786100580000,21.08000000],[1786100880000,21.58000000],[1786101180000,21.84000000],[1786101480000,21.88000000],[1786101780000,21.76000000],[1786102080000,21.60000000],[1786102380000,21.78000000],[1786102680000,21.80000000],[1786102980000,21.74000000],[1786103280000,21.70000000],[1786103580000,21.70000000],[1786103880000,21.66000000],[1786104180000,21.80000000],[1786104480000,22.00000000],[1786104780000,22.04000000],[1786105080000,21.94000000],[1786105380000,22.08000000],[1786105680000,22.00000000],[1786105980000,21.90000000],[1786106280000,21.90000000],[1786106580000,21.90000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092540000,17.2],[1786092780000,17.3],[1786093080000,17.2],[1786093380000,17.1],[1786093680000,17.1],[1786093980000,17.1],[1786094280000,17],[1786094580000,17.1],[1786094880000,17.2],[1786095180000,17.2],[1786095480000,17.1],[1786095780000,16.8],[1786096080000,16.6],[1786096380000,16.4],[1786096680000,16.2],[1786096980000,16.3],[1786097280000,16.2],[1786097580000,16.2],[1786097880000,16.2],[1786098180000,16.2],[1786098480000,16.3],[1786098780000,16.1],[1786099080000,16.1],[1786099380000,16.1],[1786099680000,16.2],[1786099980000,16.4],[1786100280000,16.6],[1786100580000,16.7],[1786100880000,16.9],[1786101180000,16.9],[1786101480000,17],[1786101780000,16.9],[1786102080000,16.9],[1786102380000,17.1],[1786102680000,17.1],[1786102980000,17.1],[1786103280000,17.1],[1786103580000,17],[1786103880000,17],[1786104180000,17],[1786104480000,17],[1786104780000,17.1],[1786105080000,16.9],[1786105380000,16.9],[1786105680000,16.9],[1786105980000,16.8],[1786106280000,16.8],[1786106580000,16.8],], 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: [[1786092540000,19.50000000],[1786092780000,19.72000000],[1786093080000,19.44000000],[1786093380000,19.54000000],[1786093680000,19.96000000],[1786093980000,20.14000000],[1786094280000,20.18000000],[1786094580000,20.86000000],[1786094880000,21.64000000],[1786095180000,21.38000000],[1786095480000,21.30000000],[1786095780000,21.00000000],[1786096080000,20.70000000],[1786096380000,20.56000000],[1786096680000,21.04000000],[1786096980000,21.18000000],[1786097280000,20.90000000],[1786097580000,21.22000000],[1786097880000,21.38000000],[1786098180000,21.12000000],[1786098480000,21.28000000],[1786098780000,20.88000000],[1786099080000,20.94000000],[1786099380000,21.96000000],[1786099680000,22.70000000],[1786099980000,23.44000000],[1786100280000,23.44000000],[1786100580000,24.84000000],[1786100880000,26.32000000],[1786101180000,26.20000000],[1786101480000,25.48000000],[1786101780000,24.88000000],[1786102080000,24.68000000],[1786102380000,24.84000000],[1786102680000,24.70000000],[1786102980000,24.08000000],[1786103280000,24.14000000],[1786103580000,24.36000000],[1786103880000,24.12000000],[1786104180000,25.38000000],[1786104480000,25.22000000],[1786104780000,24.58000000],[1786105080000,24.70000000],[1786105380000,25.06000000],[1786105680000,24.22000000],[1786105980000,24.02000000],[1786106280000,24.08000000],[1786106580000,24.15000000],], 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: [[1786092540000,85.77500000],[1786092780000,85.70000000],[1786093080000,85.30000000],[1786093380000,85.00000000],[1786093680000,84.96000000],[1786093980000,84.48000000],[1786094280000,83.58000000],[1786094580000,82.88000000],[1786094880000,81.98000000],[1786095180000,80.52000000],[1786095480000,79.46000000],[1786095780000,78.74000000],[1786096080000,78.32000000],[1786096380000,78.44000000],[1786096680000,78.44000000],[1786096980000,78.60000000],[1786097280000,78.78000000],[1786097580000,79.06000000],[1786097880000,78.96000000],[1786098180000,78.78000000],[1786098480000,78.90000000],[1786098780000,78.18000000],[1786099080000,78.24000000],[1786099380000,78.04000000],[1786099680000,77.16000000],[1786099980000,76.80000000],[1786100280000,76.38000000],[1786100580000,76.04000000],[1786100880000,74.86000000],[1786101180000,73.78000000],[1786101480000,73.80000000],[1786101780000,73.96000000],[1786102080000,74.70000000],[1786102380000,74.80000000],[1786102680000,74.96000000],[1786102980000,75.20000000],[1786103280000,75.38000000],[1786103580000,74.88000000],[1786103880000,74.72000000],[1786104180000,74.50000000],[1786104480000,73.20000000],[1786104780000,73.54000000],[1786105080000,73.36000000],[1786105380000,72.70000000],[1786105680000,72.70000000],[1786105980000,72.74000000],[1786106280000,73.02000000],[1786106580000,72.90000000],], 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: [[1786092540000,5.04],[1786092780000,3.96],[1786093080000,5.76],[1786093380000,4.68],[1786093680000,4.032],[1786093980000,5.472],[1786094280000,5.112],[1786094580000,5.256],[1786094880000,4.104],[1786095180000,5.4],[1786095480000,4.464],[1786095780000,5.76],[1786096080000,4.824],[1786096380000,4.896],[1786096680000,4.32],[1786096980000,5.04],[1786097280000,4.464],[1786097580000,4.896],[1786097880000,5.544],[1786098180000,3.456],[1786098480000,5.4],[1786098780000,7.056],[1786099080000,5.184],[1786099380000,3.672],[1786099680000,3.096],[1786099980000,5.256],[1786100280000,6.48],[1786100580000,4.464],[1786100880000,4.608],[1786101180000,3.96],[1786101480000,6.336],[1786101780000,6.048],[1786102080000,5.04],[1786102380000,4.752],[1786102680000,3.24],[1786102980000,6.336],[1786103280000,3.744],[1786103580000,5.328],[1786103880000,4.248],[1786104180000,2.52],[1786104480000,4.392],[1786104780000,5.4],[1786105080000,3.384],[1786105380000,3.456],[1786105680000,5.472],[1786105980000,3.888],[1786106280000,4.824],[1786106580000,3.6],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092540000,9.09],[1786092780000,6.84],[1786093080000,9.936],[1786093380000,7.056],[1786093680000,7.056],[1786093980000,9.792],[1786094280000,10.44],[1786094580000,8.352],[1786094880000,7.848],[1786095180000,9.936],[1786095480000,8.856],[1786095780000,9.576],[1786096080000,7.992],[1786096380000,8.208],[1786096680000,6.768],[1786096980000,7.848],[1786097280000,6.768],[1786097580000,7.56],[1786097880000,10.296],[1786098180000,6.768],[1786098480000,7.704],[1786098780000,12.168],[1786099080000,7.632],[1786099380000,5.4],[1786099680000,6.264],[1786099980000,9.648],[1786100280000,11.088],[1786100580000,7.2],[1786100880000,7.704],[1786101180000,6.912],[1786101480000,10.512],[1786101780000,9.36],[1786102080000,9.576],[1786102380000,7.92],[1786102680000,6.192],[1786102980000,11.52],[1786103280000,9.144],[1786103580000,9.72],[1786103880000,7.56],[1786104180000,5.04],[1786104480000,6.624],[1786104780000,10.584],[1786105080000,6.48],[1786105380000,6.552],[1786105680000,8.136],[1786105980000,6.408],[1786106280000,8.496],[1786106580000,6.12],], 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: [[1786092540000,227.77500000],[1786092780000,273.70000000],[1786093080000,302.46000000],[1786093380000,270.76000000],[1786093680000,252.08000000],[1786093980000,284.64000000],[1786094280000,250.54000000],[1786094580000,305.08000000],[1786094880000,256.58000000],[1786095180000,299.72000000],[1786095480000,230.00000000],[1786095780000,315.22000000],[1786096080000,193.48000000],[1786096380000,285.30000000],[1786096680000,306.72000000],[1786096980000,279.56000000],[1786097280000,319.50000000],[1786097580000,216.00000000],[1786097880000,311.94000000],[1786098180000,236.68000000],[1786098480000,301.86000000],[1786098780000,277.44000000],[1786099080000,256.22000000],[1786099380000,275.46000000],[1786099680000,264.48000000],[1786099980000,271.18000000],[1786100280000,242.42000000],[1786100580000,246.08000000],[1786100880000,307.14000000],[1786101180000,305.98000000],[1786101480000,264.52000000],[1786101780000,307.50000000],[1786102080000,259.42000000],[1786102380000,164.92000000],[1786102680000,161.88000000],[1786102980000,271.36000000],[1786103280000,205.88000000],[1786103580000,209.34000000],[1786103880000,239.24000000],[1786104180000,148.04000000],[1786104480000,235.70000000],[1786104780000,253.84000000],[1786105080000,258.98000000],[1786105380000,257.56000000],[1786105680000,312.94000000],[1786105980000,303.12000000],[1786106280000,298.72000000],[1786106580000,306.95000000],], 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: [[1786092540000,0],[1786092780000,0],[1786093080000,0],[1786093380000,0],[1786093680000,0],[1786093980000,0],[1786094280000,0],[1786094580000,0],[1786094880000,0],[1786095180000,0],[1786095480000,0],[1786095780000,0],[1786096080000,0],[1786096380000,0],[1786096680000,0],[1786096980000,0],[1786097280000,0],[1786097580000,0],[1786097880000,0],[1786098180000,0],[1786098480000,0],[1786098780000,0],[1786099080000,0],[1786099380000,0],[1786099680000,0],[1786099980000,0],[1786100280000,0],[1786100580000,0],[1786100880000,0],[1786101180000,0],[1786101480000,0],[1786101780000,0],[1786102080000,0],[1786102380000,0],[1786102680000,0],[1786102980000,0],[1786103280000,0],[1786103580000,0],[1786103880000,0],[1786104180000,0],[1786104480000,0],[1786104780000,0],[1786105080000,0],[1786105380000,0],[1786105680000,0],[1786105980000,0],[1786106280000,0],[1786106580000,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; }