var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092360000,23.85000000],[1786092480000,23.72000000],[1786092780000,23.76000000],[1786093080000,23.76000000],[1786093380000,24.00000000],[1786093680000,24.16000000],[1786093980000,23.82000000],[1786094280000,23.94000000],[1786094580000,24.36000000],[1786094880000,24.50000000],[1786095180000,24.18000000],[1786095480000,24.38000000],[1786095780000,24.68000000],[1786096080000,24.76000000],[1786096380000,24.92000000],[1786096680000,24.86000000],[1786096980000,25.18000000],[1786097280000,25.04000000],[1786097580000,24.96000000],[1786097880000,25.82000000],[1786098180000,25.80000000],[1786098480000,26.32000000],[1786098780000,26.12000000],[1786099080000,25.82000000],[1786099380000,25.70000000],[1786099680000,25.92000000],[1786099980000,26.20000000],[1786100280000,26.44000000],[1786100580000,25.78000000],[1786100880000,25.58000000],[1786101180000,25.46000000],[1786101480000,26.00000000],[1786101780000,25.98000000],[1786102080000,25.58000000],[1786102380000,25.60000000],[1786102680000,25.88000000],[1786102980000,26.18000000],[1786103280000,25.56000000],[1786103580000,24.90000000],[1786103880000,24.84000000],[1786104180000,24.66000000],[1786104480000,25.52000000],[1786104780000,25.90000000],[1786105080000,25.96000000],[1786105380000,25.16000000],[1786105680000,24.80000000],[1786105980000,24.86000000],[1786106280000,24.70000000],[1786106580000,24.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092360000,18.8],[1786092480000,18.8],[1786092780000,18.9],[1786093080000,18.8],[1786093380000,19],[1786093680000,19],[1786093980000,18.7],[1786094280000,18.8],[1786094580000,18.9],[1786094880000,18.4],[1786095180000,18.4],[1786095480000,18.3],[1786095780000,18.2],[1786096080000,18.2],[1786096380000,18.2],[1786096680000,18.3],[1786096980000,18.3],[1786097280000,18.3],[1786097580000,18.2],[1786097880000,18.2],[1786098180000,18],[1786098480000,18],[1786098780000,17.8],[1786099080000,17.6],[1786099380000,17.7],[1786099680000,17.5],[1786099980000,17.5],[1786100280000,17.7],[1786100580000,17.1],[1786100880000,17.1],[1786101180000,17],[1786101480000,17],[1786101780000,16.8],[1786102080000,16.6],[1786102380000,16.3],[1786102680000,16],[1786102980000,16.2],[1786103280000,16.2],[1786103580000,16.1],[1786103880000,16],[1786104180000,15.9],[1786104480000,16.1],[1786104780000,16.3],[1786105080000,16.1],[1786105380000,15.7],[1786105680000,15.7],[1786105980000,15.8],[1786106280000,15.8],[1786106580000,15.7],], 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: [[1786092360000,27.25000000],[1786092480000,26.94000000],[1786092780000,26.52000000],[1786093080000,26.34000000],[1786093380000,26.78000000],[1786093680000,27.14000000],[1786093980000,26.28000000],[1786094280000,26.34000000],[1786094580000,27.60000000],[1786094880000,28.68000000],[1786095180000,27.76000000],[1786095480000,27.84000000],[1786095780000,29.56000000],[1786096080000,30.22000000],[1786096380000,29.88000000],[1786096680000,29.12000000],[1786096980000,29.38000000],[1786097280000,28.88000000],[1786097580000,28.42000000],[1786097880000,30.12000000],[1786098180000,30.46000000],[1786098480000,31.74000000],[1786098780000,31.64000000],[1786099080000,30.40000000],[1786099380000,30.08000000],[1786099680000,31.38000000],[1786099980000,32.52000000],[1786100280000,32.88000000],[1786100580000,31.84000000],[1786100880000,31.08000000],[1786101180000,29.52000000],[1786101480000,30.18000000],[1786101780000,30.80000000],[1786102080000,30.70000000],[1786102380000,31.60000000],[1786102680000,32.70000000],[1786102980000,33.12000000],[1786103280000,30.72000000],[1786103580000,28.68000000],[1786103880000,28.24000000],[1786104180000,27.96000000],[1786104480000,30.34000000],[1786104780000,32.16000000],[1786105080000,32.96000000],[1786105380000,31.42000000],[1786105680000,29.00000000],[1786105980000,28.06000000],[1786106280000,27.50000000],[1786106580000,27.10000000],], 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: [[1786092360000,73.30000000],[1786092480000,73.98000000],[1786092780000,74.50000000],[1786093080000,73.80000000],[1786093380000,73.92000000],[1786093680000,73.22000000],[1786093980000,73.00000000],[1786094280000,73.02000000],[1786094580000,71.90000000],[1786094880000,69.10000000],[1786095180000,70.02000000],[1786095480000,69.08000000],[1786095780000,67.24000000],[1786096080000,66.90000000],[1786096380000,66.36000000],[1786096680000,66.96000000],[1786096980000,65.92000000],[1786097280000,66.42000000],[1786097580000,66.22000000],[1786097880000,62.82000000],[1786098180000,62.32000000],[1786098480000,60.18000000],[1786098780000,60.34000000],[1786099080000,60.46000000],[1786099380000,61.52000000],[1786099680000,59.94000000],[1786099980000,58.98000000],[1786100280000,58.64000000],[1786100580000,58.76000000],[1786100880000,59.58000000],[1786101180000,59.44000000],[1786101480000,57.80000000],[1786101780000,56.94000000],[1786102080000,57.80000000],[1786102380000,56.36000000],[1786102680000,54.54000000],[1786102980000,54.28000000],[1786103280000,56.36000000],[1786103580000,58.02000000],[1786103880000,58.00000000],[1786104180000,58.34000000],[1786104480000,56.18000000],[1786104780000,55.50000000],[1786105080000,54.68000000],[1786105380000,55.90000000],[1786105680000,56.90000000],[1786105980000,57.20000000],[1786106280000,57.92000000],[1786106580000,58.50000000],], 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: [[1786092360000,1017.4],[1786092480000,1017.4],[1786092780000,1017.4],[1786093080000,1017.4],[1786093380000,1017.4],[1786093680000,1017.4],[1786093980000,1017.5],[1786094280000,1017.6],[1786094580000,1017.6],[1786094880000,1017.6],[1786095180000,1017.6],[1786095480000,1017.6],[1786095780000,1017.6],[1786096080000,1017.5],[1786096380000,1017.5],[1786096680000,1017.4],[1786096980000,1017.4],[1786097280000,1017.4],[1786097580000,1017.4],[1786097880000,1017.2],[1786098180000,1017.2],[1786098480000,1017.2],[1786098780000,1017.2],[1786099080000,1017.2],[1786099380000,1017.3],[1786099680000,1017.3],[1786099980000,1017.4],[1786100280000,1017.3],[1786100580000,1017.4],[1786100880000,1017.4],[1786101180000,1017.4],[1786101480000,1017.3],[1786101780000,1017.4],[1786102080000,1017.4],[1786102380000,1017.4],[1786102680000,1017.4],[1786102980000,1017.4],[1786103280000,1017.4],[1786103580000,1017.5],[1786103880000,1017.6],[1786104180000,1017.7],[1786104480000,1017.6],[1786104780000,1017.5],[1786105080000,1017.5],[1786105380000,1017.6],[1786105680000,1017.6],[1786105980000,1017.5],[1786106280000,1017.5],[1786106580000,1017.6],], 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: [[1786092360000,14.04],[1786092480000,13.032],[1786092780000,12.528],[1786093080000,10.368],[1786093380000,12.096],[1786093680000,17.928],[1786093980000,19.44],[1786094280000,18.936],[1786094580000,18.216],[1786094880000,20.52],[1786095180000,19.728],[1786095480000,17.136],[1786095780000,16.272],[1786096080000,17.496],[1786096380000,11.952],[1786096680000,15.048],[1786096980000,15.12],[1786097280000,15.624],[1786097580000,17.568],[1786097880000,17.424],[1786098180000,18.288],[1786098480000,18.792],[1786098780000,24.984],[1786099080000,28.728],[1786099380000,26.568],[1786099680000,23.328],[1786099980000,20.736],[1786100280000,22.392],[1786100580000,20.952],[1786100880000,21.456],[1786101180000,25.632],[1786101480000,23.184],[1786101780000,28.8],[1786102080000,31.176],[1786102380000,29.016],[1786102680000,25.992],[1786102980000,24.048],[1786103280000,25.848],[1786103580000,29.304],[1786103880000,25.632],[1786104180000,22.464],[1786104480000,21.96],[1786104780000,26.064],[1786105080000,24.12],[1786105380000,21.6],[1786105680000,22.32],[1786105980000,23.112],[1786106280000,25.704],[1786106580000,24.12],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092360000,18.54],[1786092480000,16.2],[1786092780000,15.624],[1786093080000,13.536],[1786093380000,15.696],[1786093680000,22.464],[1786093980000,24.12],[1786094280000,23.76],[1786094580000,22.248],[1786094880000,25.776],[1786095180000,23.904],[1786095480000,22.176],[1786095780000,21.456],[1786096080000,21.744],[1786096380000,16.056],[1786096680000,20.52],[1786096980000,19.224],[1786097280000,20.304],[1786097580000,24.12],[1786097880000,22.032],[1786098180000,23.544],[1786098480000,24.48],[1786098780000,30.744],[1786099080000,34.2],[1786099380000,32.616],[1786099680000,29.952],[1786099980000,26.784],[1786100280000,31.032],[1786100580000,27.072],[1786100880000,29.232],[1786101180000,34.416],[1786101480000,29.448],[1786101780000,37.584],[1786102080000,40.032],[1786102380000,37.296],[1786102680000,32.832],[1786102980000,32.4],[1786103280000,33.696],[1786103580000,35.928],[1786103880000,31.968],[1786104180000,28.512],[1786104480000,29.952],[1786104780000,33.84],[1786105080000,33.768],[1786105380000,29.16],[1786105680000,27.792],[1786105980000,29.376],[1786106280000,31.536],[1786106580000,32.04],], 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: [[1786092360000,48.70000000],[1786092480000,47.42000000],[1786092780000,46.04000000],[1786093080000,35.88000000],[1786093380000,21.10000000],[1786093680000,10.74000000],[1786093980000,19.62000000],[1786094280000,13.38000000],[1786094580000,22.64000000],[1786094880000,29.50000000],[1786095180000,31.66000000],[1786095480000,45.50000000],[1786095780000,56.14000000],[1786096080000,31.78000000],[1786096380000,22.68000000],[1786096680000,83.48000000],[1786096980000,75.10000000],[1786097280000,285.08000000],[1786097580000,213.50000000],[1786097880000,86.12000000],[1786098180000,22.06000000],[1786098480000,35.34000000],[1786098780000,33.46000000],[1786099080000,32.52000000],[1786099380000,29.66000000],[1786099680000,36.18000000],[1786099980000,19.48000000],[1786100280000,24.70000000],[1786100580000,50.20000000],[1786100880000,27.54000000],[1786101180000,17.16000000],[1786101480000,23.40000000],[1786101780000,21.12000000],[1786102080000,23.30000000],[1786102380000,25.16000000],[1786102680000,30.32000000],[1786102980000,36.70000000],[1786103280000,35.04000000],[1786103580000,17.24000000],[1786103880000,21.96000000],[1786104180000,21.50000000],[1786104480000,19.70000000],[1786104780000,153.68000000],[1786105080000,149.30000000],[1786105380000,21.70000000],[1786105680000,23.30000000],[1786105980000,22.80000000],[1786106280000,26.64000000],[1786106580000,34.05000000],], 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: [[1786092360000,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; }