var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092540000,28.42500000],[1786092780000,28.48000000],[1786093080000,28.94000000],[1786093380000,29.24000000],[1786093680000,29.42000000],[1786093980000,29.78000000],[1786094280000,30.06000000],[1786094580000,30.14000000],[1786094880000,29.88000000],[1786095180000,29.70000000],[1786095480000,29.74000000],[1786095780000,30.20000000],[1786096080000,30.48000000],[1786096380000,30.22000000],[1786096680000,30.42000000],[1786096980000,30.44000000],[1786097280000,30.66000000],[1786097580000,30.86000000],[1786097880000,31.16000000],[1786098180000,30.72000000],[1786098480000,30.66000000],[1786098780000,30.64000000],[1786099080000,31.28000000],[1786099380000,31.52000000],[1786099680000,31.26000000],[1786099980000,31.56000000],[1786100280000,31.10000000],[1786100580000,30.88000000],[1786100880000,31.08000000],[1786101180000,30.92000000],[1786101480000,30.72000000],[1786101780000,30.02000000],[1786102080000,29.54000000],[1786102380000,29.14000000],[1786102680000,29.02000000],[1786102980000,28.48000000],[1786103280000,28.30000000],[1786103580000,28.32000000],[1786103880000,28.78000000],[1786104180000,28.46000000],[1786104480000,28.20000000],[1786104780000,28.54000000],[1786105080000,28.48000000],[1786105380000,28.14000000],[1786105680000,28.24000000],[1786105980000,28.50000000],[1786106280000,28.42000000],[1786106580000,28.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092540000,14.3],[1786092780000,14.1],[1786093080000,14.1],[1786093380000,14.3],[1786093680000,14.1],[1786093980000,14.3],[1786094280000,14.2],[1786094580000,13.9],[1786094880000,13.7],[1786095180000,14],[1786095480000,13.8],[1786095780000,13.2],[1786096080000,13.2],[1786096380000,13.3],[1786096680000,13.3],[1786096980000,13.4],[1786097280000,12.8],[1786097580000,12.7],[1786097880000,12.4],[1786098180000,11.7],[1786098480000,11.9],[1786098780000,12.1],[1786099080000,11.5],[1786099380000,11.9],[1786099680000,12.1],[1786099980000,12.4],[1786100280000,13.2],[1786100580000,13.8],[1786100880000,13.9],[1786101180000,14.2],[1786101480000,14.4],[1786101780000,14.8],[1786102080000,14.8],[1786102380000,15],[1786102680000,15],[1786102980000,15.3],[1786103280000,15.2],[1786103580000,15.1],[1786103880000,15.2],[1786104180000,15.3],[1786104480000,15.2],[1786104780000,15.1],[1786105080000,15.1],[1786105380000,15.3],[1786105680000,15.2],[1786105980000,15.2],[1786106280000,15.3],[1786106580000,15.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() { var dataset = [{label: "5 cm nad povrchom (\u00b0C)", data: [[1786092540000,35.80000000],[1786092780000,37.60000000],[1786093080000,38.00000000],[1786093380000,38.40000000],[1786093680000,37.72000000],[1786093980000,38.40000000],[1786094280000,39.36000000],[1786094580000,37.30000000],[1786094880000,39.46000000],[1786095180000,38.30000000],[1786095480000,40.28000000],[1786095780000,41.34000000],[1786096080000,40.48000000],[1786096380000,40.62000000],[1786096680000,40.20000000],[1786096980000,42.88000000],[1786097280000,43.34000000],[1786097580000,43.24000000],[1786097880000,43.40000000],[1786098180000,42.22000000],[1786098480000,42.50000000],[1786098780000,42.72000000],[1786099080000,44.92000000],[1786099380000,43.50000000],[1786099680000,42.04000000],[1786099980000,43.04000000],[1786100280000,41.52000000],[1786100580000,41.00000000],[1786100880000,41.76000000],[1786101180000,38.84000000],[1786101480000,38.66000000],[1786101780000,37.50000000],[1786102080000,38.20000000],[1786102380000,37.54000000],[1786102680000,38.12000000],[1786102980000,34.14000000],[1786103280000,36.36000000],[1786103580000,36.22000000],[1786103880000,37.14000000],[1786104180000,34.20000000],[1786104480000,36.06000000],[1786104780000,37.84000000],[1786105080000,34.08000000],[1786105380000,33.44000000],[1786105680000,34.58000000],[1786105980000,36.12000000],[1786106280000,35.56000000],[1786106580000,36.00000000],], 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,41.95000000],[1786092780000,41.38000000],[1786093080000,40.22000000],[1786093380000,40.06000000],[1786093680000,39.04000000],[1786093980000,38.74000000],[1786094280000,37.84000000],[1786094580000,37.10000000],[1786094880000,37.20000000],[1786095180000,38.32000000],[1786095480000,37.64000000],[1786095780000,35.38000000],[1786096080000,34.78000000],[1786096380000,35.44000000],[1786096680000,34.94000000],[1786096980000,35.28000000],[1786097280000,33.52000000],[1786097580000,32.94000000],[1786097880000,31.62000000],[1786098180000,31.04000000],[1786098480000,31.56000000],[1786098780000,31.98000000],[1786099080000,29.56000000],[1786099380000,29.98000000],[1786099680000,30.82000000],[1786099980000,30.96000000],[1786100280000,33.50000000],[1786100580000,35.28000000],[1786100880000,34.98000000],[1786101180000,36.16000000],[1786101480000,36.92000000],[1786101780000,39.44000000],[1786102080000,40.68000000],[1786102380000,42.12000000],[1786102680000,42.48000000],[1786102980000,44.56000000],[1786103280000,44.86000000],[1786103580000,44.58000000],[1786103880000,43.60000000],[1786104180000,44.82000000],[1786104480000,45.02000000],[1786104780000,43.84000000],[1786105080000,44.26000000],[1786105380000,45.66000000],[1786105680000,44.92000000],[1786105980000,44.30000000],[1786106280000,44.74000000],[1786106580000,44.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: [[1786092540000,1013.5],[1786092780000,1013.5],[1786093080000,1013.4],[1786093380000,1013.3],[1786093680000,1013.2],[1786093980000,1013.1],[1786094280000,1013],[1786094580000,1013],[1786094880000,1013],[1786095180000,1013.1],[1786095480000,1013],[1786095780000,1012.8],[1786096080000,1012.7],[1786096380000,1012.7],[1786096680000,1012.6],[1786096980000,1012.6],[1786097280000,1012.5],[1786097580000,1012.3],[1786097880000,1012.2],[1786098180000,1012.3],[1786098480000,1012.3],[1786098780000,1012.2],[1786099080000,1012.1],[1786099380000,1012],[1786099680000,1012],[1786099980000,1011.9],[1786100280000,1012],[1786100580000,1011.9],[1786100880000,1011.8],[1786101180000,1011.8],[1786101480000,1011.9],[1786101780000,1012.1],[1786102080000,1012.1],[1786102380000,1012.3],[1786102680000,1012.3],[1786102980000,1012.5],[1786103280000,1012.6],[1786103580000,1012.5],[1786103880000,1012.5],[1786104180000,1012.5],[1786104480000,1012.6],[1786104780000,1012.5],[1786105080000,1012.4],[1786105380000,1012.5],[1786105680000,1012.4],[1786105980000,1012.4],[1786106280000,1012.4],[1786106580000,1012.4],], 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: [[1786092540000,13.77],[1786092780000,8.064],[1786093080000,9.72],[1786093380000,9.936],[1786093680000,11.448],[1786093980000,8.496],[1786094280000,9.216],[1786094580000,11.952],[1786094880000,10.296],[1786095180000,10.872],[1786095480000,8.208],[1786095780000,9.36],[1786096080000,11.448],[1786096380000,13.608],[1786096680000,10.728],[1786096980000,10.512],[1786097280000,7.848],[1786097580000,11.376],[1786097880000,10.944],[1786098180000,14.616],[1786098480000,12.6],[1786098780000,12.672],[1786099080000,9.288],[1786099380000,8.136],[1786099680000,10.584],[1786099980000,12.024],[1786100280000,15.12],[1786100580000,12.96],[1786100880000,10.224],[1786101180000,14.976],[1786101480000,13.032],[1786101780000,18.576],[1786102080000,17.28],[1786102380000,22.392],[1786102680000,21.672],[1786102980000,17.352],[1786103280000,20.52],[1786103580000,19.296],[1786103880000,16.488],[1786104180000,18.648],[1786104480000,15.192],[1786104780000,17.568],[1786105080000,17.568],[1786105380000,14.904],[1786105680000,13.536],[1786105980000,15.48],[1786106280000,17.64],[1786106580000,15.720000012],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092540000,17.55],[1786092780000,12.6],[1786093080000,14.904],[1786093380000,13.32],[1786093680000,15.624],[1786093980000,14.112],[1786094280000,15.12],[1786094580000,17.352],[1786094880000,16.848],[1786095180000,16.2],[1786095480000,14.04],[1786095780000,16.992],[1786096080000,17.424],[1786096380000,18.288],[1786096680000,16.344],[1786096980000,14.328],[1786097280000,12.96],[1786097580000,17.136],[1786097880000,17.064],[1786098180000,20.088],[1786098480000,18.216],[1786098780000,17.856],[1786099080000,14.256],[1786099380000,11.952],[1786099680000,16.128],[1786099980000,16.848],[1786100280000,21.384],[1786100580000,18.648],[1786100880000,15.624],[1786101180000,23.112],[1786101480000,22.752],[1786101780000,26.712],[1786102080000,27],[1786102380000,32.04],[1786102680000,31.392],[1786102980000,27.576],[1786103280000,27.36],[1786103580000,26.784],[1786103880000,26.136],[1786104180000,27.36],[1786104480000,23.832],[1786104780000,24.768],[1786105080000,24.48],[1786105380000,24.84],[1786105680000,19.584],[1786105980000,23.04],[1786106280000,25.992],[1786106580000,23.280000012],], 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,354.22500000],[1786092780000,208.14000000],[1786093080000,276.72000000],[1786093380000,208.36000000],[1786093680000,28.54000000],[1786093980000,142.24000000],[1786094280000,148.02000000],[1786094580000,149.44000000],[1786094880000,213.98000000],[1786095180000,345.66000000],[1786095480000,310.96000000],[1786095780000,204.52000000],[1786096080000,263.40000000],[1786096380000,288.82000000],[1786096680000,149.36000000],[1786096980000,299.24000000],[1786097280000,303.58000000],[1786097580000,347.28000000],[1786097880000,269.20000000],[1786098180000,349.72000000],[1786098480000,216.32000000],[1786098780000,317.26000000],[1786099080000,317.52000000],[1786099380000,206.78000000],[1786099680000,331.24000000],[1786099980000,137.44000000],[1786100280000,211.82000000],[1786100580000,32.26000000],[1786100880000,215.22000000],[1786101180000,348.68000000],[1786101480000,329.02000000],[1786101780000,354.40000000],[1786102080000,213.20000000],[1786102380000,351.42000000],[1786102680000,212.76000000],[1786102980000,210.92000000],[1786103280000,350.88000000],[1786103580000,92.38000000],[1786103880000,79.00000000],[1786104180000,351.26000000],[1786104480000,221.92000000],[1786104780000,208.70000000],[1786105080000,210.14000000],[1786105380000,211.04000000],[1786105680000,277.50000000],[1786105980000,345.34000000],[1786106280000,282.12000000],[1786106580000,346.26666667],], 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; }