var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1591880522000,21.00000000],[1591880581000,21.07500000],[1591880881000,21.72000000],[1591881182000,21.90000000],[1591881482000,21.77500000],[1591881781000,21.22000000],[1591882081000,20.88000000],[1591882381000,21.08000000],[1591882682000,21.06000000],[1591882981000,21.18000000],[1591883281000,21.55000000],[1591883553000,21.73333333],[1591883881000,22.44000000],[1591884181000,22.32000000],[1591884481000,22.26000000],[1591884781000,22.24000000],[1591885082000,21.72000000],[1591885381000,21.50000000],[1591885681000,21.28000000],[1591885982000,21.34000000],[1591886281000,20.98000000],[1591886581000,20.72500000],[1591886882000,20.80000000],[1591887251000,20.85000000],[1591887565000,21.02500000],[1591887781000,21.10000000],[1591888054000,20.90000000],[1591888462000,20.96000000],[1591888727000,20.88000000],[1591888981000,20.83333333],[1591889296000,20.75000000],[1591889581000,20.55000000],[1591889881000,20.58000000],[1591890191000,20.44000000],[1591890515000,20.60000000],[1591890782000,20.54000000],[1591891090000,20.58000000],[1591891381000,20.64000000],[1591891742000,20.67500000],[1591891981000,20.66000000],[1591892281000,20.73333333],[1591892581000,20.75000000],[1591892850000,20.80000000],[1591893190000,20.86000000],[1591893481000,21.77500000],[1591893760000,22.13333333],[1591894113000,22.30000000],[1591894381000,21.90000000],[1591894681000,21.28000000],[1591894981000,21.02500000],[1591895291000,20.84000000],[1591895582000,20.75000000],[1591895894000,20.60000000],[1591896181000,20.68000000],[1591896481000,20.40000000],[1591896901000,20.50000000],[1591897081000,20.23333333],[1591897381000,19.82000000],[1591897681000,19.74000000],[1591897981000,19.42000000],[1591898301000,19.16000000],[1591898582000,19.00000000],[1591898882000,18.82000000],[1591899181000,18.74000000],[1591899481000,18.60000000],[1591899810000,18.36000000],[1591900081000,18.16000000],[1591900382000,17.88000000],[1591900681000,17.52000000],[1591900981000,17.34000000],[1591901282000,17.30000000],[1591901581000,17.52000000],[1591901882000,17.46000000],[1591902182000,17.18000000],[1591902481000,16.84000000],[1591902781000,16.86000000],[1591903082000,17.22000000],[1591903382000,17.84000000],[1591903681000,17.74000000],[1591903982000,16.68000000],[1591904282000,16.12000000],[1591904581000,16.00000000],[1591904881000,15.90000000],[1591905182000,16.10000000],[1591905481000,16.12000000],[1591905781000,16.08000000],[1591906081000,15.90000000],[1591906382000,15.76000000],[1591906681000,15.64000000],[1591906981000,15.50000000],[1591907282000,15.40000000],[1591907581000,15.52000000],[1591907881000,15.48000000],[1591908181000,15.76000000],[1591908481000,15.64000000],[1591908781000,15.32000000],[1591909081000,15.24000000],[1591909381000,15.24000000],[1591909682000,15.20000000],[1591909982000,15.36000000],[1591910281000,15.62000000],[1591910581000,15.74000000],[1591910881000,15.76000000],[1591911182000,15.86000000],[1591911481000,15.92000000],[1591911781000,15.90000000],[1591912082000,15.80000000],[1591912381000,15.48000000],[1591912681000,15.35000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1591880522000,14.4],[1591880581000,14.5],[1591880881000,14.8],[1591887781000,12.7],[1591888981000,12.6],[1591889881000,13.8],[1591890782000,13.2],[1591891381000,13.1],[1591891981000,12.8],[1591892281000,13],[1591892581000,13.1],[1591893481000,13.8],[1591894381000,13.8],[1591894681000,13.4],[1591894981000,12.4],[1591895582000,12.1],[1591896181000,12.8],[1591896481000,12.4],[1591897381000,13],[1591897681000,13],[1591897981000,13.1],[1591898582000,12.9],[1591898882000,12.6],[1591899181000,12.6],[1591899481000,12.6],[1591900081000,12.7],[1591900382000,12.9],[1591900681000,12.9],[1591900981000,12.9],[1591901282000,12.4],[1591901581000,12.5],[1591902182000,12.9],[1591902481000,12.6],[1591902781000,12.2],[1591903082000,11.6],[1591903382000,11.9],[1591903681000,12.3],[1591904282000,12.4],[1591904581000,11.9],[1591904881000,12],[1591905182000,11.8],[1591905481000,11.5],[1591905781000,11.8],[1591906081000,11.8],[1591906382000,11.5],[1591906681000,11.4],[1591906981000,11.5],[1591907282000,11.3],[1591907581000,11.8],[1591907881000,11.6],[1591908181000,11.1],[1591908481000,11.3],[1591908781000,11.4],[1591909081000,11.1],[1591909381000,11.8],[1591909682000,11.6],[1591909982000,11.4],[1591910281000,11.4],[1591910581000,11.5],[1591910881000,11.3],[1591911182000,11.4],[1591911481000,10.7],[1591911781000,11.2],[1591912082000,11.6],[1591912381000,11.6],[1591912681000,11.9],], 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() { dataset = [ { label: 'Vlhkosť (%)', data: [[1591880522000,66.00000000],[1591880581000,66.08000000],[1591880881000,64.80000000],[1591887242000,60.35000000],[1591887481000,59.32000000],[1591887781000,59.02000000],[1591888081000,60.32000000],[1591888382000,59.44000000],[1591888681000,58.62000000],[1591888981000,59.54000000],[1591889281000,60.90000000],[1591889582000,63.78000000],[1591889881000,65.40000000],[1591890182000,65.82000000],[1591890482000,63.94000000],[1591890782000,62.90000000],[1591891082000,62.48000000],[1591891381000,62.06000000],[1591891681000,62.26000000],[1591891981000,61.00000000],[1591892281000,61.44000000],[1591892581000,61.84000000],[1591892882000,60.76000000],[1591893182000,62.92000000],[1591893481000,60.62000000],[1591893781000,59.50000000],[1591894082000,59.00000000],[1591894381000,60.22000000],[1591894681000,61.06000000],[1591894981000,57.92000000],[1591895281000,56.28000000],[1591895582000,57.92000000],[1591895882000,59.80000000],[1591896181000,60.70000000],[1591896481000,60.26000000],[1591896782000,60.06000000],[1591897082000,63.66000000],[1591897381000,65.08000000],[1591897681000,65.12000000],[1591897981000,66.90000000],[1591898281000,67.24000000],[1591898582000,67.92000000],[1591898882000,67.42000000],[1591899181000,67.56000000],[1591899481000,68.42000000],[1591899781000,69.18000000],[1591900081000,70.52000000],[1591900382000,72.94000000],[1591900681000,74.34000000],[1591900981000,75.12000000],[1591901282000,73.30000000],[1591901581000,72.42000000],[1591901881000,72.92000000],[1591902182000,76.12000000],[1591902481000,76.26000000],[1591902781000,74.10000000],[1591903082000,69.78000000],[1591903382000,68.40000000],[1591903681000,70.60000000],[1591903981000,77.74000000],[1591904282000,78.86000000],[1591904581000,76.74000000],[1591904881000,77.78000000],[1591905182000,76.02000000],[1591905481000,74.46000000],[1591905781000,76.02000000],[1591906081000,76.62000000],[1591906382000,76.20000000],[1591906681000,76.04000000],[1591906981000,77.20000000],[1591907282000,76.80000000],[1591907581000,78.72000000],[1591907881000,77.96000000],[1591908181000,73.96000000],[1591908481000,75.60000000],[1591908781000,77.52000000],[1591909081000,76.48000000],[1591909381000,80.14000000],[1591909682000,79.38000000],[1591909982000,77.32000000],[1591910281000,76.00000000],[1591910581000,76.18000000],[1591910881000,75.08000000],[1591911182000,75.08000000],[1591911481000,71.42000000],[1591911781000,74.00000000],[1591912082000,76.26000000],[1591912381000,78.06000000],[1591912681000,79.95000000],], 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: [[1591880522000,1010.2],[1591880581000,1010.2],[1591880881000,1010.1],[1591887781000,1009.4],[1591888981000,1009.2],[1591889881000,1009.3],[1591890782000,1009.4],[1591891381000,1009.3],[1591891981000,1009.3],[1591892281000,1009.3],[1591892581000,1009.4],[1591893481000,1009.2],[1591894381000,1009.3],[1591894681000,1009.3],[1591894981000,1009.2],[1591895582000,1009.3],[1591896181000,1009.3],[1591896481000,1009.3],[1591897381000,1009.4],[1591897681000,1009.4],[1591897981000,1009.5],[1591898582000,1009.4],[1591898882000,1009.4],[1591899181000,1009.4],[1591899481000,1009.4],[1591900081000,1009.5],[1591900382000,1009.6],[1591900681000,1009.7],[1591900981000,1009.8],[1591901282000,1009.8],[1591901581000,1009.9],[1591902182000,1010],[1591902481000,1010.1],[1591902781000,1010.1],[1591903082000,1010.1],[1591903382000,1009.9],[1591903681000,1009.9],[1591904282000,1010.2],[1591904581000,1010.3],[1591904881000,1010.4],[1591905182000,1010.5],[1591905481000,1010.4],[1591905781000,1010.4],[1591906081000,1010.4],[1591906382000,1010.4],[1591906681000,1010.5],[1591906981000,1010.5],[1591907282000,1010.4],[1591907581000,1010.3],[1591907881000,1010.2],[1591908181000,1010.2],[1591908481000,1010.3],[1591908781000,1010.3],[1591909081000,1010.3],[1591909381000,1010.3],[1591909682000,1010.3],[1591909982000,1010.3],[1591910281000,1010.3],[1591910581000,1010.3],[1591910881000,1010.2],[1591911182000,1010.2],[1591911481000,1010.1],[1591911781000,1010.2],[1591912082000,1010.1],[1591912381000,1010.2],[1591912681000,1010.2],], 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); }); $('.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; }