var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786092540000,32.25000000],[1786092780000,32.30000000],[1786093080000,32.48000000],[1786093380000,32.42000000],[1786093680000,32.10000000],[1786093980000,32.56000000],[1786094280000,32.80000000],[1786094580000,33.02000000],[1786094880000,33.32000000],[1786095180000,33.18000000],[1786095480000,32.92000000],[1786095780000,33.04000000],[1786096080000,33.24000000],[1786096380000,33.32000000],[1786096680000,33.56000000],[1786096980000,33.40000000],[1786097280000,33.24000000],[1786097580000,33.18000000],[1786097880000,33.72000000],[1786098180000,33.34000000],[1786098480000,33.50000000],[1786098780000,33.52000000],[1786099080000,33.44000000],[1786099380000,33.92000000],[1786099680000,33.12000000],[1786099980000,32.52000000],[1786100280000,32.96000000],[1786100580000,33.62000000],[1786100880000,33.16000000],[1786101180000,32.98000000],[1786101480000,32.92000000],[1786101780000,32.74000000],[1786102080000,32.98000000],[1786102380000,33.06000000],[1786102680000,32.74000000],[1786102980000,32.72000000],[1786103280000,33.44000000],[1786103580000,34.20000000],[1786103880000,34.30000000],[1786104180000,34.10000000],[1786104480000,33.90000000],[1786104780000,33.94000000],[1786105080000,33.78000000],[1786105380000,33.88000000],[1786105680000,33.84000000],[1786105980000,33.96000000],[1786106280000,33.58000000],[1786106580000,33.70000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786092540000,13.3],[1786092780000,13.2],[1786093080000,13.3],[1786093380000,13.5],[1786093680000,13.6],[1786093980000,13.6],[1786094280000,13.7],[1786094580000,13.7],[1786094880000,13.8],[1786095180000,13.7],[1786095480000,13.9],[1786095780000,13.9],[1786096080000,13.9],[1786096380000,13.9],[1786096680000,13.9],[1786096980000,13.9],[1786097280000,13.8],[1786097580000,13.8],[1786097880000,13.6],[1786098180000,13.7],[1786098480000,13.6],[1786098780000,13.6],[1786099080000,13.1],[1786099380000,13.2],[1786099680000,13.4],[1786099980000,13.3],[1786100280000,13],[1786100580000,13.1],[1786100880000,13.3],[1786101180000,13.1],[1786101480000,12.9],[1786101780000,12.5],[1786102080000,12.5],[1786102380000,12.5],[1786102680000,12],[1786102980000,11.7],[1786103280000,11.9],[1786103580000,12.6],[1786103880000,13.9],[1786104180000,14.2],[1786104480000,14.3],[1786104780000,14.4],[1786105080000,14.5],[1786105380000,14.8],[1786105680000,14.7],[1786105980000,14.6],[1786106280000,14.8],[1786106580000,14.6],], 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,39.75000000],[1786092780000,40.46000000],[1786093080000,41.50000000],[1786093380000,41.18000000],[1786093680000,40.68000000],[1786093980000,41.66000000],[1786094280000,41.92000000],[1786094580000,42.72000000],[1786094880000,43.20000000],[1786095180000,42.54000000],[1786095480000,42.54000000],[1786095780000,42.48000000],[1786096080000,43.10000000],[1786096380000,43.04000000],[1786096680000,42.66000000],[1786096980000,41.82000000],[1786097280000,39.90000000],[1786097580000,41.06000000],[1786097880000,41.24000000],[1786098180000,39.18000000],[1786098480000,41.00000000],[1786098780000,40.04000000],[1786099080000,42.08000000],[1786099380000,41.46000000],[1786099680000,36.28000000],[1786099980000,36.24000000],[1786100280000,42.12000000],[1786100580000,41.38000000],[1786100880000,37.58000000],[1786101180000,37.46000000],[1786101480000,36.24000000],[1786101780000,36.26000000],[1786102080000,38.82000000],[1786102380000,36.78000000],[1786102680000,35.76000000],[1786102980000,36.22000000],[1786103280000,41.52000000],[1786103580000,43.12000000],[1786103880000,41.46000000],[1786104180000,41.26000000],[1786104480000,41.60000000],[1786104780000,41.54000000],[1786105080000,42.04000000],[1786105380000,41.38000000],[1786105680000,42.08000000],[1786105980000,42.76000000],[1786106280000,42.30000000],[1786106580000,42.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,31.60000000],[1786092780000,31.18000000],[1786093080000,31.08000000],[1786093380000,31.68000000],[1786093680000,32.46000000],[1786093980000,31.60000000],[1786094280000,31.34000000],[1786094580000,30.94000000],[1786094880000,30.70000000],[1786095180000,30.76000000],[1786095480000,31.50000000],[1786095780000,31.36000000],[1786096080000,30.90000000],[1786096380000,30.92000000],[1786096680000,30.36000000],[1786096980000,30.66000000],[1786097280000,30.70000000],[1786097580000,30.84000000],[1786097880000,29.64000000],[1786098180000,30.46000000],[1786098480000,29.90000000],[1786098780000,29.82000000],[1786099080000,29.12000000],[1786099380000,28.38000000],[1786099680000,30.14000000],[1786099980000,31.04000000],[1786100280000,29.76000000],[1786100580000,28.74000000],[1786100880000,29.96000000],[1786101180000,29.92000000],[1786101480000,29.62000000],[1786101780000,29.04000000],[1786102080000,28.60000000],[1786102380000,28.46000000],[1786102680000,28.06000000],[1786102980000,27.70000000],[1786103280000,26.82000000],[1786103580000,26.86000000],[1786103880000,29.14000000],[1786104180000,29.98000000],[1786104480000,30.70000000],[1786104780000,30.74000000],[1786105080000,31.32000000],[1786105380000,31.58000000],[1786105680000,31.58000000],[1786105980000,31.06000000],[1786106280000,32.24000000],[1786106580000,31.65000000],], 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: 'Rýchlosť vetra (km/h)', data: [[1786092540000,10.44],[1786092780000,7.128],[1786093080000,3.672],[1786093380000,5.256],[1786093680000,9.648],[1786093980000,7.704],[1786094280000,8.568],[1786094580000,8.424],[1786094880000,9.36],[1786095180000,7.632],[1786095480000,9.648],[1786095780000,10.368],[1786096080000,11.376],[1786096380000,9.072],[1786096680000,11.088],[1786096980000,11.448],[1786097280000,5.832],[1786097580000,10.152],[1786097880000,11.88],[1786098180000,4.32],[1786098480000,7.488],[1786098780000,10.872],[1786099080000,8.352],[1786099380000,10.728],[1786099680000,8.496],[1786099980000,9.072],[1786100280000,7.992],[1786100580000,10.872],[1786100880000,6.408],[1786101180000,7.488],[1786101480000,6.264],[1786101780000,6.84],[1786102080000,5.184],[1786102380000,6.624],[1786102680000,9.648],[1786102980000,7.344],[1786103280000,9.504],[1786103580000,11.088],[1786103880000,13.248],[1786104180000,15.12],[1786104480000,12.312],[1786104780000,12.888],[1786105080000,10.944],[1786105380000,13.104],[1786105680000,10.584],[1786105980000,11.592],[1786106280000,12.384],[1786106580000,11.16],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786092540000,15.12],[1786092780000,10.944],[1786093080000,6.408],[1786093380000,8.28],[1786093680000,13.752],[1786093980000,13.32],[1786094280000,13.392],[1786094580000,12.456],[1786094880000,14.688],[1786095180000,10.728],[1786095480000,13.608],[1786095780000,15.912],[1786096080000,17.856],[1786096380000,13.68],[1786096680000,18.144],[1786096980000,16.2],[1786097280000,9.576],[1786097580000,14.616],[1786097880000,17.064],[1786098180000,6.408],[1786098480000,12.168],[1786098780000,18.792],[1786099080000,13.608],[1786099380000,17.856],[1786099680000,12.6],[1786099980000,15.624],[1786100280000,14.256],[1786100580000,16.992],[1786100880000,9.72],[1786101180000,11.016],[1786101480000,10.296],[1786101780000,9.504],[1786102080000,8.712],[1786102380000,9.864],[1786102680000,13.104],[1786102980000,11.592],[1786103280000,16.632],[1786103580000,19.368],[1786103880000,23.544],[1786104180000,26.064],[1786104480000,19.656],[1786104780000,20.376],[1786105080000,17.424],[1786105380000,21.672],[1786105680000,17.064],[1786105980000,20.088],[1786106280000,21.816],[1786106580000,19.98],], 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,189.20000000],[1786092780000,194.40000000],[1786093080000,207.50000000],[1786093380000,183.62000000],[1786093680000,177.32000000],[1786093980000,183.86000000],[1786094280000,185.24000000],[1786094580000,179.74000000],[1786094880000,154.20000000],[1786095180000,149.64000000],[1786095480000,181.08000000],[1786095780000,197.34000000],[1786096080000,187.54000000],[1786096380000,143.68000000],[1786096680000,174.32000000],[1786096980000,198.14000000],[1786097280000,213.20000000],[1786097580000,179.80000000],[1786097880000,198.92000000],[1786098180000,180.12000000],[1786098480000,231.20000000],[1786098780000,265.80000000],[1786099080000,267.94000000],[1786099380000,277.80000000],[1786099680000,275.46000000],[1786099980000,255.82000000],[1786100280000,250.56000000],[1786100580000,265.52000000],[1786100880000,268.26000000],[1786101180000,275.38000000],[1786101480000,259.74000000],[1786101780000,233.86000000],[1786102080000,230.88000000],[1786102380000,291.54000000],[1786102680000,320.44000000],[1786102980000,302.76000000],[1786103280000,283.92000000],[1786103580000,288.72000000],[1786103880000,274.66000000],[1786104180000,299.00000000],[1786104480000,297.36000000],[1786104780000,303.74000000],[1786105080000,300.68000000],[1786105380000,300.98000000],[1786105680000,300.22000000],[1786105980000,297.68000000],[1786106280000,294.84000000],[1786106580000,283.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],[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; }