var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092360000,23.95000000],[1786092480000,23.90000000],[1786092780000,23.94000000],[1786093080000,23.42000000],[1786093380000,23.40000000],[1786093680000,23.50000000],[1786093980000,23.76000000],[1786094280000,24.02000000],[1786094580000,23.98000000],[1786094880000,24.48000000],[1786095180000,24.40000000],[1786095480000,24.28000000],[1786095780000,24.26000000],[1786096080000,24.30000000],[1786096380000,24.28000000],[1786096680000,24.34000000],[1786096980000,24.44000000],[1786097280000,24.48000000],[1786097580000,24.44000000],[1786097880000,24.30000000],[1786098180000,24.16000000],[1786098480000,24.40000000],[1786098780000,24.62000000],[1786099080000,24.44000000],[1786099380000,23.88000000],[1786099680000,24.10000000],[1786099980000,24.44000000],[1786100280000,24.60000000],[1786100580000,24.42000000],[1786100880000,24.14000000],[1786101180000,23.76000000],[1786101480000,23.84000000],[1786101780000,23.56000000],[1786102080000,23.56000000],[1786102380000,23.74000000],[1786102680000,23.04000000],[1786102980000,22.56000000],[1786103280000,22.30000000],[1786103580000,21.96000000],[1786103880000,21.52000000],[1786104180000,21.24000000],[1786104480000,21.28000000],[1786104780000,21.68000000],[1786105080000,21.48000000],[1786105380000,21.34000000],[1786105680000,21.16000000],[1786105980000,21.44000000],[1786106280000,21.38000000],[1786106580000,21.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092360000,14.8],[1786092480000,14.9],[1786092780000,14.9],[1786093080000,14.9],[1786093380000,14.7],[1786093680000,14.8],[1786093980000,14.6],[1786094280000,14.3],[1786094580000,14.2],[1786094880000,14.5],[1786095180000,14.2],[1786095480000,14],[1786095780000,14.1],[1786096080000,14],[1786096380000,14.2],[1786096680000,14.2],[1786096980000,14.3],[1786097280000,14.3],[1786097580000,14.2],[1786097880000,14.2],[1786098180000,13.8],[1786098480000,13.8],[1786098780000,13.8],[1786099080000,13.7],[1786099380000,13.6],[1786099680000,14.1],[1786099980000,14.2],[1786100280000,14.1],[1786100580000,14],[1786100880000,14],[1786101180000,14.2],[1786101480000,14.6],[1786101780000,14.5],[1786102080000,14.6],[1786102380000,14.7],[1786102680000,14.9],[1786102980000,15.2],[1786103280000,15.1],[1786103580000,14.9],[1786103880000,14.8],[1786104180000,14.7],[1786104480000,14.7],[1786104780000,14.8],[1786105080000,14.7],[1786105380000,14.5],[1786105680000,14.5],[1786105980000,14.5],[1786106280000,14.4],[1786106580000,14.4],], 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,23.45000000],[1786092480000,23.00000000],[1786092780000,23.10000000],[1786093080000,21.96000000],[1786093380000,22.08000000],[1786093680000,22.46000000],[1786093980000,22.90000000],[1786094280000,23.18000000],[1786094580000,23.18000000],[1786094880000,24.26000000],[1786095180000,23.98000000],[1786095480000,23.56000000],[1786095780000,23.84000000],[1786096080000,23.68000000],[1786096380000,23.60000000],[1786096680000,23.24000000],[1786096980000,23.62000000],[1786097280000,24.08000000],[1786097580000,23.64000000],[1786097880000,22.54000000],[1786098180000,22.34000000],[1786098480000,23.96000000],[1786098780000,24.02000000],[1786099080000,23.18000000],[1786099380000,22.24000000],[1786099680000,22.52000000],[1786099980000,24.26000000],[1786100280000,24.90000000],[1786100580000,23.82000000],[1786100880000,23.32000000],[1786101180000,22.58000000],[1786101480000,22.88000000],[1786101780000,22.14000000],[1786102080000,22.34000000],[1786102380000,23.14000000],[1786102680000,21.68000000],[1786102980000,21.22000000],[1786103280000,21.16000000],[1786103580000,20.62000000],[1786103880000,20.04000000],[1786104180000,20.06000000],[1786104480000,20.20000000],[1786104780000,20.68000000],[1786105080000,20.62000000],[1786105380000,20.30000000],[1786105680000,19.76000000],[1786105980000,20.40000000],[1786106280000,20.92000000],[1786106580000,21.20000000],], 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,56.85000000],[1786092480000,57.26000000],[1786092780000,57.18000000],[1786093080000,58.86000000],[1786093380000,58.10000000],[1786093680000,58.32000000],[1786093980000,56.58000000],[1786094280000,54.68000000],[1786094580000,54.52000000],[1786094880000,53.72000000],[1786095180000,53.06000000],[1786095480000,52.70000000],[1786095780000,53.10000000],[1786096080000,52.56000000],[1786096380000,53.32000000],[1786096680000,53.32000000],[1786096980000,53.28000000],[1786097280000,53.04000000],[1786097580000,52.86000000],[1786097880000,53.32000000],[1786098180000,52.50000000],[1786098480000,51.74000000],[1786098780000,51.02000000],[1786099080000,51.20000000],[1786099380000,52.76000000],[1786099680000,53.80000000],[1786099980000,52.84000000],[1786100280000,52.02000000],[1786100580000,52.32000000],[1786100880000,53.22000000],[1786101180000,55.10000000],[1786101480000,56.50000000],[1786101780000,56.94000000],[1786102080000,57.30000000],[1786102380000,57.10000000],[1786102680000,60.38000000],[1786102980000,63.28000000],[1786103280000,64.04000000],[1786103580000,64.30000000],[1786103880000,65.90000000],[1786104180000,66.34000000],[1786104480000,66.38000000],[1786104780000,65.14000000],[1786105080000,65.48000000],[1786105380000,65.24000000],[1786105680000,66.00000000],[1786105980000,64.70000000],[1786106280000,64.68000000],[1786106580000,64.40000000],], 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.2],[1786092480000,1017.2],[1786092780000,1017.2],[1786093080000,1017.3],[1786093380000,1017.4],[1786093680000,1017.3],[1786093980000,1017.2],[1786094280000,1017.1],[1786094580000,1017.1],[1786094880000,1016.9],[1786095180000,1016.9],[1786095480000,1016.9],[1786095780000,1016.9],[1786096080000,1016.9],[1786096380000,1016.8],[1786096680000,1016.8],[1786096980000,1016.8],[1786097280000,1016.7],[1786097580000,1016.7],[1786097880000,1016.7],[1786098180000,1016.7],[1786098480000,1016.7],[1786098780000,1016.5],[1786099080000,1016.5],[1786099380000,1016.7],[1786099680000,1016.6],[1786099980000,1016.5],[1786100280000,1016.4],[1786100580000,1016.4],[1786100880000,1016.5],[1786101180000,1016.6],[1786101480000,1016.7],[1786101780000,1016.7],[1786102080000,1016.8],[1786102380000,1016.7],[1786102680000,1016.8],[1786102980000,1017.1],[1786103280000,1017.4],[1786103580000,1017.4],[1786103880000,1017.8],[1786104180000,1017.9],[1786104480000,1017.8],[1786104780000,1017.7],[1786105080000,1017.8],[1786105380000,1017.6],[1786105680000,1017.6],[1786105980000,1017.6],[1786106280000,1017.7],[1786106580000,1017.8],], 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,16.2],[1786092480000,19.224],[1786092780000,20.592],[1786093080000,22.536],[1786093380000,20.808],[1786093680000,19.512],[1786093980000,17.712],[1786094280000,18.936],[1786094580000,17.064],[1786094880000,15.192],[1786095180000,17.856],[1786095480000,19.296],[1786095780000,19.44],[1786096080000,19.656],[1786096380000,20.736],[1786096680000,20.52],[1786096980000,19.224],[1786097280000,19.656],[1786097580000,21.24],[1786097880000,18.936],[1786098180000,20.088],[1786098480000,11.232],[1786098780000,16.488],[1786099080000,19.152],[1786099380000,19.8],[1786099680000,15.624],[1786099980000,17.424],[1786100280000,16.848],[1786100580000,23.76],[1786100880000,24.048],[1786101180000,30.456],[1786101480000,24.408],[1786101780000,28.44],[1786102080000,24.408],[1786102380000,21.024],[1786102680000,26.568],[1786102980000,29.304],[1786103280000,24.336],[1786103580000,31.32],[1786103880000,29.16],[1786104180000,31.752],[1786104480000,29.664],[1786104780000,25.632],[1786105080000,25.128],[1786105380000,30.096],[1786105680000,29.664],[1786105980000,26.136],[1786106280000,28.224],[1786106580000,25.74],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092360000,27],[1786092480000,26.424],[1786092780000,30.528],[1786093080000,31.464],[1786093380000,28.152],[1786093680000,26.496],[1786093980000,25.2],[1786094280000,25.56],[1786094580000,23.184],[1786094880000,22.32],[1786095180000,25.488],[1786095480000,26.352],[1786095780000,25.848],[1786096080000,26.424],[1786096380000,28.44],[1786096680000,28.656],[1786096980000,25.2],[1786097280000,26.712],[1786097580000,27.432],[1786097880000,28.08],[1786098180000,28.08],[1786098480000,18.648],[1786098780000,26.28],[1786099080000,27.648],[1786099380000,31.32],[1786099680000,23.472],[1786099980000,28.08],[1786100280000,26.136],[1786100580000,36.432],[1786100880000,35.28],[1786101180000,43.56],[1786101480000,34.2],[1786101780000,43.416],[1786102080000,35.568],[1786102380000,31.968],[1786102680000,40.536],[1786102980000,45.144],[1786103280000,37.008],[1786103580000,46.512],[1786103880000,42.624],[1786104180000,45.864],[1786104480000,44.712],[1786104780000,40.68],[1786105080000,41.472],[1786105380000,47.232],[1786105680000,45.648],[1786105980000,44.208],[1786106280000,46.656],[1786106580000,40.68],], 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,69.10000000],[1786092480000,53.00000000],[1786092780000,48.44000000],[1786093080000,44.34000000],[1786093380000,47.44000000],[1786093680000,38.12000000],[1786093980000,45.62000000],[1786094280000,39.16000000],[1786094580000,47.80000000],[1786094880000,36.42000000],[1786095180000,42.16000000],[1786095480000,43.12000000],[1786095780000,41.98000000],[1786096080000,38.26000000],[1786096380000,42.70000000],[1786096680000,37.34000000],[1786096980000,40.20000000],[1786097280000,44.64000000],[1786097580000,41.62000000],[1786097880000,37.04000000],[1786098180000,28.60000000],[1786098480000,16.18000000],[1786098780000,29.54000000],[1786099080000,35.12000000],[1786099380000,31.04000000],[1786099680000,155.88000000],[1786099980000,88.68000000],[1786100280000,39.42000000],[1786100580000,50.32000000],[1786100880000,46.42000000],[1786101180000,42.34000000],[1786101480000,42.06000000],[1786101780000,49.02000000],[1786102080000,34.54000000],[1786102380000,28.60000000],[1786102680000,30.86000000],[1786102980000,29.66000000],[1786103280000,21.40000000],[1786103580000,27.46000000],[1786103880000,24.50000000],[1786104180000,15.62000000],[1786104480000,17.12000000],[1786104780000,22.40000000],[1786105080000,18.00000000],[1786105380000,24.02000000],[1786105680000,22.36000000],[1786105980000,19.26000000],[1786106280000,87.86000000],[1786106580000,10.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; }