var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092540000,29.47500000],[1786092780000,29.62000000],[1786093080000,29.92000000],[1786093380000,30.20000000],[1786093680000,29.94000000],[1786093980000,29.80000000],[1786094280000,30.10000000],[1786094580000,30.44000000],[1786094880000,30.46000000],[1786095180000,30.56000000],[1786095480000,30.64000000],[1786095780000,30.84000000],[1786096080000,31.08000000],[1786096380000,31.06000000],[1786096680000,31.12000000],[1786096980000,31.02000000],[1786097280000,31.14000000],[1786097580000,31.18000000],[1786097880000,31.12000000],[1786098180000,30.68000000],[1786098480000,30.28000000],[1786098780000,30.06000000],[1786099080000,30.00000000],[1786099380000,30.10000000],[1786099680000,30.18000000],[1786099980000,29.84000000],[1786100280000,28.98000000],[1786100580000,28.50000000],[1786100880000,28.22000000],[1786101180000,28.06000000],[1786101480000,28.02000000],[1786101780000,27.94000000],[1786102080000,27.64000000],[1786102380000,26.94000000],[1786102680000,26.48000000],[1786102980000,25.70000000],[1786103280000,24.78000000],[1786103640000,24.10000000],[1786103880000,23.68000000],[1786104180000,23.30000000],[1786104480000,22.96000000],[1786104780000,22.72000000],[1786105080000,22.62000000],[1786105380000,22.98000000],[1786105680000,22.94000000],[1786105980000,22.94000000],[1786106280000,22.92000000],[1786106580000,22.90000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092540000,16.5],[1786092780000,16.6],[1786093080000,16.5],[1786093380000,16.9],[1786093680000,16.1],[1786093980000,16.2],[1786094280000,16.6],[1786094580000,16.2],[1786094880000,16.2],[1786095180000,16],[1786095480000,16],[1786095780000,16],[1786096080000,16.1],[1786096380000,16.1],[1786096680000,16],[1786096980000,15.9],[1786097280000,16.1],[1786097580000,16.3],[1786097880000,16],[1786098180000,16.4],[1786098480000,16.2],[1786098780000,16.1],[1786099080000,16.4],[1786099380000,16],[1786099680000,16.1],[1786099980000,16.1],[1786100280000,15.6],[1786100580000,15.8],[1786100880000,15.6],[1786101180000,15.5],[1786101480000,15.5],[1786101780000,16.3],[1786102080000,16],[1786102380000,16.2],[1786102680000,16.9],[1786102980000,17.5],[1786103280000,17.9],[1786103640000,18.1],[1786103880000,18.2],[1786104180000,18.4],[1786104480000,19.1],[1786104780000,19.7],[1786105080000,19.1],[1786105380000,19.3],[1786105680000,18.9],[1786105980000,19.2],[1786106280000,19.1],[1786106580000,19.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() { var dataset = [{label: "5 cm nad povrchom (\u00b0C)", data: [[1786092540000,38.15000000],[1786092780000,38.86000000],[1786093080000,39.14000000],[1786093380000,39.44000000],[1786093680000,38.14000000],[1786093980000,38.32000000],[1786094280000,38.14000000],[1786094580000,39.04000000],[1786094880000,39.18000000],[1786095180000,39.02000000],[1786095480000,40.32000000],[1786095780000,40.20000000],[1786096080000,40.44000000],[1786096380000,39.78000000],[1786096680000,39.96000000],[1786096980000,39.90000000],[1786097280000,39.02000000],[1786097580000,39.82000000],[1786097880000,35.84000000],[1786098180000,33.70000000],[1786098480000,33.58000000],[1786098780000,32.62000000],[1786099080000,33.18000000],[1786099380000,33.26000000],[1786099680000,34.68000000],[1786099980000,31.46000000],[1786100280000,30.36000000],[1786100580000,29.90000000],[1786100880000,29.68000000],[1786101180000,30.24000000],[1786101480000,32.08000000],[1786101780000,31.64000000],[1786102080000,29.60000000],[1786102380000,27.96000000],[1786102680000,27.38000000],[1786102980000,25.06000000],[1786103280000,21.98000000],[1786103580000,21.50000000],[1786103880000,21.54000000],[1786104180000,21.64000000],[1786104480000,21.80000000],[1786104780000,22.46000000],[1786105080000,24.24000000],[1786105380000,25.72000000],[1786105680000,23.56000000],[1786105980000,23.34000000],[1786106280000,22.94000000],[1786106580000,22.70000000],], 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,45.47500000],[1786092780000,45.34000000],[1786093080000,44.28000000],[1786093380000,44.74000000],[1786093680000,43.10000000],[1786093980000,43.82000000],[1786094280000,44.06000000],[1786094580000,42.36000000],[1786094880000,42.30000000],[1786095180000,41.32000000],[1786095480000,41.20000000],[1786095780000,40.86000000],[1786096080000,40.46000000],[1786096380000,40.56000000],[1786096680000,40.12000000],[1786096980000,40.10000000],[1786097280000,40.26000000],[1786097580000,40.64000000],[1786097880000,40.14000000],[1786098180000,42.12000000],[1786098480000,42.66000000],[1786098780000,42.90000000],[1786099080000,43.90000000],[1786099380000,42.48000000],[1786099680000,42.50000000],[1786099980000,43.46000000],[1786100280000,44.24000000],[1786100580000,46.02000000],[1786100880000,46.22000000],[1786101180000,46.50000000],[1786101480000,46.42000000],[1786101780000,49.12000000],[1786102080000,49.10000000],[1786102380000,51.94000000],[1786102680000,55.66000000],[1786102980000,60.66000000],[1786103280000,65.52000000],[1786103640000,69.06000000],[1786103880000,71.54000000],[1786104180000,73.86000000],[1786104480000,78.84000000],[1786104780000,83.18000000],[1786105080000,80.40000000],[1786105380000,80.02000000],[1786105680000,78.14000000],[1786105980000,79.40000000],[1786106280000,79.26000000],[1786106580000,79.75000000],], 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.1],[1786092780000,1013.1],[1786093080000,1013],[1786093380000,1012.9],[1786093680000,1012.8],[1786093980000,1012.8],[1786094280000,1012.7],[1786094580000,1012.6],[1786094880000,1012.5],[1786095180000,1012.5],[1786095480000,1012.4],[1786095780000,1012.4],[1786096080000,1012.3],[1786096380000,1012.2],[1786096680000,1012.2],[1786096980000,1012.2],[1786097280000,1012.1],[1786097580000,1012],[1786097880000,1011.9],[1786098180000,1011.9],[1786098480000,1011.9],[1786098780000,1011.9],[1786099080000,1012],[1786099380000,1012],[1786099680000,1012],[1786099980000,1012.1],[1786100280000,1012.4],[1786100580000,1012.4],[1786100880000,1012.4],[1786101180000,1012.4],[1786101480000,1012.4],[1786101780000,1012.5],[1786102080000,1012.6],[1786102380000,1012.8],[1786102680000,1013],[1786102980000,1013.3],[1786103280000,1013.6],[1786103640000,1013.9],[1786103880000,1014.2],[1786104180000,1014.3],[1786104480000,1014.6],[1786104780000,1014.8],[1786105080000,1014.6],[1786105380000,1014.4],[1786105680000,1014.6],[1786105980000,1014.8],[1786106280000,1015],[1786106580000,1015.1],], 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,4.5],[1786092780000,3.456],[1786093080000,2.664],[1786093380000,3.384],[1786093680000,5.256],[1786093980000,3.528],[1786094280000,3.6],[1786094580000,4.248],[1786094880000,4.392],[1786095180000,4.68],[1786095480000,2.808],[1786095780000,3.744],[1786096080000,5.04],[1786096380000,3.6],[1786096680000,5.256],[1786096980000,3.528],[1786097280000,4.104],[1786097580000,4.464],[1786097880000,4.896],[1786098180000,8.64],[1786098480000,8.64],[1786098780000,6.264],[1786099080000,3.096],[1786099380000,4.032],[1786099680000,4.32],[1786099980000,13.68],[1786100280000,8.064],[1786100580000,5.832],[1786100880000,3.888],[1786101180000,3.672],[1786101480000,7.56],[1786101780000,5.832],[1786102080000,8.712],[1786102380000,5.616],[1786102680000,6.192],[1786102980000,7.632],[1786103280000,8.28],[1786103580000,4.896],[1786103880000,3.168],[1786104180000,5.616],[1786104480000,2.448],[1786104780000,1.296],[1786105080000,3.312],[1786105380000,3.384],[1786105680000,2.448],[1786105980000,2.16],[1786106280000,2.592],[1786106580000,2.52],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092540000,5.67],[1786092780000,5.184],[1786093080000,4.248],[1786093380000,4.896],[1786093680000,6.984],[1786093980000,5.472],[1786094280000,6.264],[1786094580000,6.48],[1786094880000,6.552],[1786095180000,7.128],[1786095480000,4.464],[1786095780000,7.128],[1786096080000,7.416],[1786096380000,5.544],[1786096680000,6.84],[1786096980000,5.256],[1786097280000,5.904],[1786097580000,6.84],[1786097880000,6.984],[1786098180000,12.096],[1786098480000,12.096],[1786098780000,8.28],[1786099080000,4.32],[1786099380000,5.832],[1786099680000,7.848],[1786099980000,20.664],[1786100280000,13.824],[1786100580000,11.664],[1786100880000,7.2],[1786101180000,6.048],[1786101480000,13.392],[1786101780000,10.44],[1786102080000,15.84],[1786102380000,11.88],[1786102680000,11.232],[1786102980000,12.96],[1786103280000,13.752],[1786103580000,8.64],[1786103880000,6.552],[1786104180000,8.568],[1786104480000,4.392],[1786104780000,2.448],[1786105080000,5.472],[1786105380000,5.4],[1786105680000,4.104],[1786105980000,3.384],[1786106280000,4.752],[1786106580000,3.6],], 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,155.75000000],[1786092780000,134.94000000],[1786093080000,143.10000000],[1786093380000,117.96000000],[1786093680000,123.14000000],[1786093980000,154.66000000],[1786094280000,323.62000000],[1786094580000,160.68000000],[1786094880000,257.88000000],[1786095180000,188.06000000],[1786095480000,126.36000000],[1786095780000,241.76000000],[1786096080000,244.26000000],[1786096380000,294.98000000],[1786096680000,288.14000000],[1786096980000,296.26000000],[1786097280000,197.16000000],[1786097580000,279.22000000],[1786097880000,301.02000000],[1786098180000,266.50000000],[1786098480000,262.42000000],[1786098780000,277.36000000],[1786099080000,275.52000000],[1786099380000,292.04000000],[1786099680000,136.22000000],[1786099980000,213.10000000],[1786100280000,14.86000000],[1786100580000,30.18000000],[1786100880000,52.44000000],[1786101180000,66.82000000],[1786101480000,83.34000000],[1786101780000,69.84000000],[1786102080000,81.28000000],[1786102380000,74.42000000],[1786102680000,62.78000000],[1786102980000,76.68000000],[1786103280000,72.00000000],[1786103580000,76.52000000],[1786103880000,48.24000000],[1786104180000,101.74000000],[1786104480000,133.94000000],[1786104780000,147.06000000],[1786105080000,42.48000000],[1786105380000,57.18000000],[1786105680000,81.30000000],[1786105980000,98.12000000],[1786106280000,31.46000000],[1786106580000,21.60000000],], 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],[1786103640000,0],[1786103880000,0.06],[1786104180000,0.086],[1786104480000,0.174],[1786104780000,0.206],[1786105080000,0.23],[1786105380000,0.23],[1786105680000,0.23],[1786105980000,0.23],[1786106280000,0.23],[1786106580000,0.23],], 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; }