var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092360000,13.65000000],[1786092480000,13.54000000],[1786092780000,13.40000000],[1786093080000,13.66000000],[1786093380000,14.16000000],[1786093680000,14.66000000],[1786093980000,14.66000000],[1786094280000,14.50000000],[1786094580000,14.44000000],[1786094880000,14.50000000],[1786095180000,14.42000000],[1786095480000,13.98000000],[1786095780000,13.94000000],[1786096080000,14.02000000],[1786096380000,13.68000000],[1786096680000,13.84000000],[1786096980000,13.64000000],[1786097280000,13.30000000],[1786097580000,13.18000000],[1786097880000,13.22000000],[1786098180000,13.38000000],[1786098480000,13.54000000],[1786098780000,13.18000000],[1786099080000,12.98000000],[1786099380000,13.20000000],[1786099680000,13.56000000],[1786099980000,13.54000000],[1786100280000,13.38000000],[1786100580000,13.38000000],[1786100880000,13.40000000],[1786101180000,13.26000000],[1786101480000,13.02000000],[1786101780000,12.52000000],[1786102080000,12.16000000],[1786102380000,11.94000000],[1786102680000,11.86000000],[1786102980000,11.78000000],[1786103280000,11.80000000],[1786103580000,12.06000000],[1786103880000,11.68000000],[1786104180000,11.50000000],[1786104480000,11.58000000],[1786104780000,11.66000000],[1786105080000,11.58000000],[1786105380000,11.66000000],[1786105680000,11.66000000],[1786105980000,11.64000000],[1786106280000,11.68000000],[1786106580000,11.70000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092360000,12.2],[1786092480000,12],[1786092780000,11.9],[1786093080000,12.2],[1786093380000,11.8],[1786093680000,12],[1786093980000,12.2],[1786094280000,12.2],[1786094580000,12.3],[1786094880000,12.6],[1786095180000,12.8],[1786095480000,12.7],[1786095780000,12.8],[1786096080000,12.9],[1786096380000,12.6],[1786096680000,12.9],[1786096980000,12.7],[1786097280000,12.3],[1786097580000,12.3],[1786097880000,12.4],[1786098180000,12.6],[1786098480000,12.7],[1786098780000,12.4],[1786099080000,12.2],[1786099380000,12.4],[1786099680000,12.7],[1786099980000,12.7],[1786100280000,12.4],[1786100580000,12.5],[1786100880000,12.6],[1786101180000,12.5],[1786101480000,12.2],[1786101780000,11.7],[1786102080000,11.4],[1786102380000,11.3],[1786102680000,11.2],[1786102980000,11.2],[1786103280000,11.2],[1786103580000,11.4],[1786103880000,11.1],[1786104180000,10.9],[1786104480000,11],[1786104780000,11],[1786105080000,11],[1786105380000,11.2],[1786105680000,11.2],[1786105980000,11.2],[1786106280000,11.2],[1786106580000,11.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 pod povrchom (\u00b0C)", data: [[1786092360000,12.60000000],[1786092480000,12.60000000],[1786092780000,12.60000000],[1786093080000,12.60000000],[1786093380000,12.60000000],[1786093680000,12.60000000],[1786093980000,12.60000000],[1786094280000,12.60000000],[1786094580000,12.60000000],[1786094880000,12.60000000],[1786095180000,12.60000000],[1786095480000,12.68000000],[1786095780000,12.70000000],[1786096080000,12.70000000],[1786096380000,12.70000000],[1786096680000,12.70000000],[1786096980000,12.70000000],[1786097280000,12.70000000],[1786097580000,12.70000000],[1786097880000,12.72000000],[1786098180000,12.80000000],[1786098480000,12.80000000],[1786098780000,12.80000000],[1786099080000,12.80000000],[1786099380000,12.80000000],[1786099680000,12.80000000],[1786099980000,12.80000000],[1786100280000,12.80000000],[1786100580000,12.80000000],[1786100880000,12.80000000],[1786101180000,12.80000000],[1786101480000,12.80000000],[1786101780000,12.80000000],[1786102080000,12.80000000],[1786102380000,12.80000000],[1786102680000,12.80000000],[1786102980000,12.82000000],[1786103280000,12.90000000],[1786103580000,12.90000000],[1786103880000,12.90000000],[1786104180000,12.90000000],[1786104480000,12.90000000],[1786104780000,12.90000000],[1786105080000,12.90000000],[1786105380000,12.90000000],[1786105680000,12.90000000],[1786105980000,12.90000000],[1786106280000,12.90000000],[1786106580000,12.90000000],], color: "#1abc9c"},{label: "10 cm pod povrchom (\u00b0C)", data: [[1786092360000,12.20000000],[1786092480000,12.20000000],[1786092780000,12.20000000],[1786093080000,12.24000000],[1786093380000,12.30000000],[1786093680000,12.30000000],[1786093980000,12.30000000],[1786094280000,12.30000000],[1786094580000,12.30000000],[1786094880000,12.30000000],[1786095180000,12.30000000],[1786095480000,12.30000000],[1786095780000,12.30000000],[1786096080000,12.30000000],[1786096380000,12.30000000],[1786096680000,12.30000000],[1786096980000,12.30000000],[1786097280000,12.30000000],[1786097580000,12.30000000],[1786097880000,12.34000000],[1786098180000,12.40000000],[1786098480000,12.40000000],[1786098780000,12.40000000],[1786099080000,12.40000000],[1786099380000,12.40000000],[1786099680000,12.40000000],[1786099980000,12.40000000],[1786100280000,12.40000000],[1786100580000,12.40000000],[1786100880000,12.40000000],[1786101180000,12.40000000],[1786101480000,12.40000000],[1786101780000,12.40000000],[1786102080000,12.40000000],[1786102380000,12.40000000],[1786102680000,12.40000000],[1786102980000,12.40000000],[1786103280000,12.40000000],[1786103580000,12.50000000],[1786103880000,12.50000000],[1786104180000,12.50000000],[1786104480000,12.50000000],[1786104780000,12.50000000],[1786105080000,12.50000000],[1786105380000,12.50000000],[1786105680000,12.50000000],[1786105980000,12.50000000],[1786106280000,12.50000000],[1786106580000,12.50000000],], color: "#3498db"},{label: "20 cm pod povrchom (\u00b0C)", data: [[1786092360000,11.20000000],[1786092480000,11.20000000],[1786092780000,11.20000000],[1786093080000,11.20000000],[1786093380000,11.20000000],[1786093680000,11.20000000],[1786093980000,11.20000000],[1786094280000,11.20000000],[1786094580000,11.20000000],[1786094880000,11.20000000],[1786095180000,11.20000000],[1786095480000,11.20000000],[1786095780000,11.20000000],[1786096080000,11.20000000],[1786096380000,11.20000000],[1786096680000,11.20000000],[1786096980000,11.20000000],[1786097280000,11.20000000],[1786097580000,11.20000000],[1786097880000,11.20000000],[1786098180000,11.20000000],[1786098480000,11.20000000],[1786098780000,11.20000000],[1786099080000,11.20000000],[1786099380000,11.20000000],[1786099680000,11.20000000],[1786099980000,11.20000000],[1786100280000,11.20000000],[1786100580000,11.20000000],[1786100880000,11.20000000],[1786101180000,11.20000000],[1786101480000,11.20000000],[1786101780000,11.20000000],[1786102080000,11.20000000],[1786102380000,11.20000000],[1786102680000,11.20000000],[1786102980000,11.20000000],[1786103280000,11.20000000],[1786103580000,11.20000000],[1786103880000,11.20000000],[1786104180000,11.20000000],[1786104480000,11.20000000],[1786104780000,11.20000000],[1786105080000,11.20000000],[1786105380000,11.20000000],[1786105680000,11.20000000],[1786105980000,11.20000000],[1786106280000,11.20000000],[1786106580000,11.20000000],], color: "#8e44ad"}]; 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,90.75000000],[1786092480000,90.78000000],[1786092780000,91.00000000],[1786093080000,90.88000000],[1786093380000,85.70000000],[1786093680000,84.08000000],[1786093980000,85.22000000],[1786094280000,86.10000000],[1786094580000,87.12000000],[1786094880000,88.68000000],[1786095180000,90.06000000],[1786095480000,92.02000000],[1786095780000,92.92000000],[1786096080000,93.00000000],[1786096380000,93.00000000],[1786096680000,93.98000000],[1786096980000,94.00000000],[1786097280000,94.00000000],[1786097580000,94.74000000],[1786097880000,95.00000000],[1786098180000,95.00000000],[1786098480000,95.00000000],[1786098780000,95.00000000],[1786099080000,95.00000000],[1786099380000,95.00000000],[1786099680000,94.74000000],[1786099980000,94.58000000],[1786100280000,94.12000000],[1786100580000,94.20000000],[1786100880000,95.00000000],[1786101180000,95.00000000],[1786101480000,95.00000000],[1786101780000,95.00000000],[1786102080000,95.46000000],[1786102380000,96.00000000],[1786102680000,96.00000000],[1786102980000,96.00000000],[1786103280000,96.00000000],[1786103580000,96.00000000],[1786103880000,96.00000000],[1786104180000,96.00000000],[1786104480000,96.00000000],[1786104780000,96.00000000],[1786105080000,96.30000000],[1786105380000,97.00000000],[1786105680000,97.00000000],[1786105980000,97.00000000],[1786106280000,97.00000000],[1786106580000,97.00000000],], 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,1018.4],[1786092480000,1018.5],[1786092780000,1018.6],[1786093080000,1018.4],[1786093380000,1017.9],[1786093680000,1017.5],[1786093980000,1017.5],[1786094280000,1017.7],[1786094580000,1017.7],[1786094880000,1017.5],[1786095180000,1017.6],[1786095480000,1018],[1786095780000,1017.9],[1786096080000,1017.8],[1786096380000,1018],[1786096680000,1018],[1786096980000,1018],[1786097280000,1018.2],[1786097580000,1018.1],[1786097880000,1018],[1786098180000,1017.9],[1786098480000,1017.8],[1786098780000,1017.9],[1786099080000,1018.4],[1786099380000,1018.1],[1786099680000,1017.6],[1786099980000,1017.4],[1786100280000,1017.6],[1786100580000,1017.5],[1786100880000,1017.4],[1786101180000,1017.5],[1786101480000,1017.5],[1786101780000,1017.8],[1786102080000,1018.2],[1786102380000,1018.6],[1786102680000,1018.6],[1786102980000,1018.7],[1786103280000,1018.7],[1786103580000,1018.4],[1786103880000,1018.6],[1786104180000,1019],[1786104480000,1018.9],[1786104780000,1018.7],[1786105080000,1018.7],[1786105380000,1018.8],[1786105680000,1018.6],[1786105980000,1018.7],[1786106280000,1018.8],[1786106580000,1018.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,14.22],[1786092480000,11.232],[1786092780000,7.848],[1786093080000,10.224],[1786093380000,4.104],[1786093680000,3.6],[1786093980000,8.064],[1786094280000,5.112],[1786094580000,8.136],[1786094880000,12.744],[1786095180000,15.336],[1786095480000,16.632],[1786095780000,17.28],[1786096080000,22.032],[1786096380000,22.608],[1786096680000,22.464],[1786096980000,26.064],[1786097280000,29.592],[1786097580000,29.664],[1786097880000,29.448],[1786098180000,27.864],[1786098480000,28.8],[1786098780000,32.904],[1786099080000,27.216],[1786099380000,30.384],[1786099680000,32.76],[1786099980000,36.288],[1786100280000,31.464],[1786100580000,33.336],[1786100880000,35.856],[1786101180000,40.248],[1786101480000,42.768],[1786101780000,45.144],[1786102080000,42.624],[1786102380000,35.496],[1786102680000,37.08],[1786102980000,33.192],[1786103280000,32.616],[1786103580000,34.2],[1786103880000,35.712],[1786104180000,30.96],[1786104480000,29.376],[1786104780000,30.096],[1786105080000,29.664],[1786105380000,26.496],[1786105680000,29.448],[1786105980000,30.312],[1786106280000,30.672],[1786106580000,32.22],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092360000,19.08],[1786092480000,14.112],[1786092780000,9.648],[1786093080000,13.464],[1786093380000,6.768],[1786093680000,5.544],[1786093980000,11.088],[1786094280000,6.912],[1786094580000,11.376],[1786094880000,16.2],[1786095180000,20.376],[1786095480000,21.168],[1786095780000,22.392],[1786096080000,26.64],[1786096380000,26.064],[1786096680000,27],[1786096980000,29.664],[1786097280000,34.344],[1786097580000,35.28],[1786097880000,32.832],[1786098180000,32.832],[1786098480000,34.992],[1786098780000,38.736],[1786099080000,31.536],[1786099380000,35.928],[1786099680000,38.016],[1786099980000,41.184],[1786100280000,36.216],[1786100580000,39.816],[1786100880000,41.976],[1786101180000,47.376],[1786101480000,49.824],[1786101780000,52.416],[1786102080000,47.736],[1786102380000,40.32],[1786102680000,40.968],[1786102980000,36.864],[1786103280000,35.928],[1786103580000,37.872],[1786103880000,39.456],[1786104180000,33.84],[1786104480000,32.616],[1786104780000,33.768],[1786105080000,33.12],[1786105380000,30.168],[1786105680000,32.544],[1786105980000,33.264],[1786106280000,34.776],[1786106580000,36.54],], 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,331.60000000],[1786092480000,325.82000000],[1786092780000,326.62000000],[1786093080000,311.84000000],[1786093380000,266.64000000],[1786093680000,300.40000000],[1786093980000,327.54000000],[1786094280000,341.04000000],[1786094580000,325.92000000],[1786094880000,336.02000000],[1786095180000,337.40000000],[1786095480000,324.48000000],[1786095780000,326.74000000],[1786096080000,328.72000000],[1786096380000,331.38000000],[1786096680000,327.14000000],[1786096980000,329.54000000],[1786097280000,335.94000000],[1786097580000,335.00000000],[1786097880000,325.28000000],[1786098180000,324.58000000],[1786098480000,327.34000000],[1786098780000,331.20000000],[1786099080000,333.26000000],[1786099380000,332.32000000],[1786099680000,329.02000000],[1786099980000,328.22000000],[1786100280000,328.04000000],[1786100580000,334.42000000],[1786100880000,329.96000000],[1786101180000,334.06000000],[1786101480000,331.70000000],[1786101780000,328.42000000],[1786102080000,329.32000000],[1786102380000,329.90000000],[1786102680000,332.76000000],[1786102980000,332.28000000],[1786103280000,328.32000000],[1786103580000,322.98000000],[1786103880000,329.96000000],[1786104180000,330.96000000],[1786104480000,335.26000000],[1786104780000,331.88000000],[1786105080000,336.60000000],[1786105380000,338.06000000],[1786105680000,338.84000000],[1786105980000,334.90000000],[1786106280000,332.96000000],[1786106580000,332.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); }); $('.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; }