var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092000000,27.26666667],[1786092180000,27.00000000],[1786092480000,26.60000000],[1786092780000,26.38000000],[1786093080000,26.04000000],[1786093380000,25.90000000],[1786093680000,25.86000000],[1786093980000,25.54000000],[1786094280000,25.06000000],[1786094580000,24.68000000],[1786094880000,23.96000000],[1786095180000,22.82000000],[1786095480000,22.08000000],[1786095780000,21.56000000],[1786096080000,21.18000000],[1786096380000,21.00000000],[1786096680000,20.84000000],[1786096980000,20.68000000],[1786097280000,20.44000000],[1786097580000,20.28000000],[1786097880000,20.00000000],[1786098180000,19.86000000],[1786098480000,19.76000000],[1786098780000,19.58000000],[1786099080000,19.50000000],[1786099380000,19.40000000],[1786099680000,19.40000000],[1786099980000,19.42000000],[1786100280000,19.54000000],[1786100580000,19.68000000],[1786100880000,19.88000000],[1786101180000,20.02000000],[1786101480000,20.16000000],[1786101780000,20.28000000],[1786102080000,20.18000000],[1786102380000,20.20000000],[1786102680000,20.30000000],[1786102980000,20.36000000],[1786103280000,20.40000000],[1786103580000,20.34000000],[1786103880000,20.24000000],[1786104180000,20.16000000],[1786104480000,20.10000000],[1786104780000,20.10000000],[1786105080000,20.18000000],[1786105380000,20.10000000],[1786105680000,20.16000000],[1786105980000,20.26000000],[1786106280000,20.20000000],[1786106580000,20.20000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092000000,19],[1786092180000,19],[1786092480000,19.1],[1786092780000,19],[1786093080000,18.8],[1786093380000,18.7],[1786093680000,18.7],[1786093980000,18.7],[1786094280000,18.6],[1786094580000,18.5],[1786094880000,18.3],[1786095180000,17.2],[1786095480000,17],[1786095780000,16.8],[1786096080000,16.6],[1786096380000,16.5],[1786096680000,16.5],[1786096980000,16.4],[1786097280000,16.3],[1786097580000,16.3],[1786097880000,16.2],[1786098180000,16.2],[1786098480000,16.2],[1786098780000,16.2],[1786099080000,16.2],[1786099380000,16.1],[1786099680000,16],[1786099980000,16],[1786100280000,15.9],[1786100580000,15.9],[1786100880000,16],[1786101180000,15.9],[1786101480000,15.9],[1786101780000,16],[1786102080000,15.9],[1786102380000,15.9],[1786102680000,15.9],[1786102980000,15.9],[1786103280000,16],[1786103580000,15.9],[1786103880000,15.9],[1786104180000,15.9],[1786104480000,15.8],[1786104780000,15.9],[1786105080000,15.8],[1786105380000,15.7],[1786105680000,15.7],[1786105980000,15.8],[1786106280000,15.9],[1786106580000,15.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: [[1786092000000,28.96666667],[1786092180000,28.00000000],[1786092480000,27.42000000],[1786092780000,26.86000000],[1786093080000,26.16000000],[1786093380000,26.28000000],[1786093680000,26.44000000],[1786093980000,25.38000000],[1786094280000,24.66000000],[1786094580000,24.34000000],[1786094880000,23.52000000],[1786095180000,22.56000000],[1786095480000,22.08000000],[1786095780000,21.52000000],[1786096080000,21.22000000],[1786096380000,21.16000000],[1786096680000,20.86000000],[1786096980000,20.52000000],[1786097280000,20.36000000],[1786097580000,20.22000000],[1786097880000,19.92000000],[1786098180000,19.82000000],[1786098480000,19.64000000],[1786098780000,19.46000000],[1786099080000,19.36000000],[1786099380000,19.30000000],[1786099680000,19.42000000],[1786099980000,19.68000000],[1786100280000,20.00000000],[1786100580000,20.52000000],[1786100880000,20.60000000],[1786101180000,20.64000000],[1786101480000,20.90000000],[1786101780000,20.76000000],[1786102080000,20.44000000],[1786102380000,20.66000000],[1786102680000,21.18000000],[1786102980000,21.20000000],[1786103280000,21.54000000],[1786103580000,20.96000000],[1786103880000,20.52000000],[1786104180000,20.34000000],[1786104480000,20.40000000],[1786104780000,20.54000000],[1786105080000,20.60000000],[1786105380000,20.56000000],[1786105680000,20.56000000],[1786105980000,20.26000000],[1786106280000,20.12000000],[1786106580000,20.30000000],], 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: [[1786092000000,60.60000000],[1786092180000,61.50000000],[1786092480000,63.48000000],[1786092780000,63.80000000],[1786093080000,64.54000000],[1786093380000,64.40000000],[1786093680000,64.54000000],[1786093980000,66.06000000],[1786094280000,67.32000000],[1786094580000,68.58000000],[1786094880000,70.76000000],[1786095180000,70.60000000],[1786095480000,73.14000000],[1786095780000,74.56000000],[1786096080000,75.20000000],[1786096380000,75.58000000],[1786096680000,76.16000000],[1786096980000,76.84000000],[1786097280000,77.28000000],[1786097580000,78.00000000],[1786097880000,79.02000000],[1786098180000,79.60000000],[1786098480000,80.04000000],[1786098780000,80.72000000],[1786099080000,81.10000000],[1786099380000,81.08000000],[1786099680000,80.84000000],[1786099980000,80.76000000],[1786100280000,79.84000000],[1786100580000,79.16000000],[1786100880000,78.62000000],[1786101180000,77.40000000],[1786101480000,76.60000000],[1786101780000,76.58000000],[1786102080000,76.58000000],[1786102380000,76.54000000],[1786102680000,76.18000000],[1786102980000,75.88000000],[1786103280000,75.94000000],[1786103580000,75.96000000],[1786103880000,76.22000000],[1786104180000,76.52000000],[1786104480000,76.60000000],[1786104780000,76.70000000],[1786105080000,75.82000000],[1786105380000,76.04000000],[1786105680000,75.88000000],[1786105980000,75.80000000],[1786106280000,76.20000000],[1786106580000,76.06666667],], 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: [[1786092000000,1014.8],[1786092180000,1014.8],[1786092480000,1015],[1786092780000,1015],[1786093080000,1015],[1786093380000,1015],[1786093680000,1015.1],[1786093980000,1015.2],[1786094280000,1015.4],[1786094580000,1015.6],[1786094880000,1016],[1786095180000,1016.3],[1786095480000,1016.6],[1786095780000,1016.8],[1786096080000,1017.1],[1786096380000,1017.3],[1786096680000,1017.4],[1786096980000,1017.5],[1786097280000,1017.5],[1786097580000,1017.6],[1786097880000,1017.8],[1786098180000,1018.1],[1786098480000,1018.3],[1786098780000,1018.3],[1786099080000,1018.5],[1786099380000,1018.6],[1786099680000,1018.5],[1786099980000,1018.4],[1786100280000,1018.3],[1786100580000,1018.2],[1786100880000,1018.2],[1786101180000,1018.2],[1786101480000,1018.2],[1786101780000,1018.3],[1786102080000,1018.4],[1786102380000,1018.4],[1786102680000,1018.2],[1786102980000,1018.2],[1786103280000,1018.2],[1786103580000,1018.3],[1786103880000,1018.3],[1786104180000,1018.2],[1786104480000,1018.2],[1786104780000,1018.1],[1786105080000,1018.2],[1786105380000,1018.4],[1786105680000,1018.5],[1786105980000,1018.7],[1786106280000,1018.8],[1786106580000,1018.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: [[1786092000000,7.679999988],[1786092180000,7.56],[1786092480000,6.336],[1786092780000,6.48],[1786093080000,9.504],[1786093380000,6.12],[1786093680000,6.912],[1786093980000,11.952],[1786094280000,12.96],[1786094580000,16.344],[1786094880000,22.968],[1786095180000,24.768],[1786095480000,21.96],[1786095780000,21.24],[1786096080000,20.376],[1786096380000,15.336],[1786096680000,16.488],[1786096980000,20.232],[1786097280000,20.592],[1786097580000,21.96],[1786097880000,21.816],[1786098180000,17.136],[1786098480000,16.128],[1786098780000,16.272],[1786099080000,7.92],[1786099380000,10.008],[1786099680000,7.92],[1786099980000,9],[1786100280000,7.272],[1786100580000,4.896],[1786100880000,7.488],[1786101180000,9.216],[1786101480000,9.216],[1786101780000,8.712],[1786102080000,9.504],[1786102380000,8.208],[1786102680000,9.504],[1786102980000,11.808],[1786103280000,12.168],[1786103580000,11.304],[1786103880000,10.584],[1786104180000,10.872],[1786104480000,11.52],[1786104780000,8.496],[1786105080000,12.384],[1786105380000,5.832],[1786105680000,5.112],[1786105980000,5.112],[1786106280000,5.688],[1786106580000,6.239999988],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092000000,12.840000012],[1786092180000,11.808],[1786092480000,9.144],[1786092780000,9.576],[1786093080000,12.744],[1786093380000,8.856],[1786093680000,10.008],[1786093980000,19.368],[1786094280000,19.224],[1786094580000,26.568],[1786094880000,30.168],[1786095180000,39.528],[1786095480000,33.264],[1786095780000,31.608],[1786096080000,29.448],[1786096380000,24.48],[1786096680000,27.936],[1786096980000,30.24],[1786097280000,30.528],[1786097580000,31.896],[1786097880000,34.344],[1786098180000,24.912],[1786098480000,25.776],[1786098780000,24.336],[1786099080000,13.32],[1786099380000,16.128],[1786099680000,13.536],[1786099980000,13.968],[1786100280000,11.664],[1786100580000,7.056],[1786100880000,9.648],[1786101180000,12.672],[1786101480000,12.24],[1786101780000,12.528],[1786102080000,15.84],[1786102380000,12.6],[1786102680000,15.048],[1786102980000,16.632],[1786103280000,17.208],[1786103580000,16.344],[1786103880000,14.688],[1786104180000,15.84],[1786104480000,15.696],[1786104780000,11.808],[1786105080000,18.72],[1786105380000,8.856],[1786105680000,6.84],[1786105980000,7.056],[1786106280000,7.776],[1786106580000,8.520000012],], 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: [[1786092000000,335.76666667],[1786092180000,276.42000000],[1786092480000,329.20000000],[1786092780000,340.32000000],[1786093080000,10.56000000],[1786093380000,321.28000000],[1786093680000,296.72000000],[1786093980000,322.40000000],[1786094280000,307.46000000],[1786094580000,305.96000000],[1786094880000,324.98000000],[1786095180000,320.70000000],[1786095480000,319.32000000],[1786095780000,308.06000000],[1786096080000,306.14000000],[1786096380000,293.76000000],[1786096680000,293.76000000],[1786096980000,275.00000000],[1786097280000,289.90000000],[1786097580000,289.60000000],[1786097880000,284.78000000],[1786098180000,280.64000000],[1786098480000,281.54000000],[1786098780000,298.52000000],[1786099080000,257.54000000],[1786099380000,292.74000000],[1786099680000,215.22000000],[1786099980000,99.76000000],[1786100280000,79.10000000],[1786100580000,171.48000000],[1786100880000,222.24000000],[1786101180000,252.80000000],[1786101480000,277.50000000],[1786101780000,249.48000000],[1786102080000,275.36000000],[1786102380000,305.00000000],[1786102680000,299.08000000],[1786102980000,273.52000000],[1786103280000,284.62000000],[1786103580000,288.88000000],[1786103880000,281.82000000],[1786104180000,280.16000000],[1786104480000,283.46000000],[1786104780000,278.90000000],[1786105080000,285.98000000],[1786105380000,254.78000000],[1786105680000,287.80000000],[1786105980000,300.48000000],[1786106280000,285.86000000],[1786106580000,299.93333333],], 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: [[1786092000000,0],[1786092180000,0],[1786092480000,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; }