var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1766530838000,3.70000000],[1766530961000,3.68000000],[1766531269000,3.72000000],[1766531577000,3.70000000],[1766531886000,3.72000000],[1766532195000,3.70000000],[1766532503000,3.70000000],[1766532750000,3.70000000],[1766533058000,3.70000000],[1766533367000,3.70000000],[1766533675000,3.72000000],[1766533984000,3.78000000],[1766534292000,3.80000000],[1766534601000,3.70000000],[1766534909000,3.70000000],[1766535156000,3.84000000],[1766535465000,3.80000000],[1766535773000,3.78000000],[1766536082000,3.70000000],[1766536390000,3.72000000],[1766536699000,3.68000000],[1766537007000,3.67500000],[1766537254000,3.60000000],[1766537565000,3.60000000],[1766537874000,3.60000000],[1766538182000,3.60000000],[1766538491000,3.56000000],[1766538800000,3.50000000],[1766539108000,3.57500000],[1766539355000,3.56000000],[1766539663000,3.50000000],[1766539971000,3.50000000],[1766540280000,3.50000000],[1766540588000,3.44000000],[1766540897000,3.42000000],[1766541205000,3.50000000],[1766541452000,3.50000000],[1766541760000,3.44000000],[1766542068000,3.44000000],[1766542377000,3.40000000],[1766542685000,3.42000000],[1766542993000,3.30000000],[1766543303000,3.30000000],[1766543550000,3.20000000],[1766543858000,3.12000000],[1766544168000,3.12000000],[1766544476000,3.06000000],[1766544786000,3.00000000],[1766545094000,2.96000000],[1766545402000,2.84000000],[1766545711000,2.85000000],[1766545957000,2.80000000],[1766546265000,2.80000000],[1766546575000,2.80000000],[1766546883000,2.78000000],[1766547192000,2.70000000],[1766547501000,2.70000000],[1766547809000,2.65000000],[1766548055000,2.60000000],[1766548364000,2.60000000],[1766548672000,2.56000000],[1766548980000,2.52000000],[1766549288000,2.48000000],[1766549596000,2.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1766530838000,1.7],[1766530961000,1.7],[1766531269000,1.7],[1766531577000,1.7],[1766531886000,1.8],[1766532195000,1.7],[1766532503000,1.7],[1766532750000,1.7],[1766533058000,1.8],[1766533367000,1.7],[1766533675000,1.8],[1766533984000,1.8],[1766534292000,1.8],[1766534601000,1.7],[1766534909000,1.7],[1766535156000,1.9],[1766535465000,1.8],[1766535773000,1.8],[1766536082000,1.7],[1766536390000,1.7],[1766536699000,1.7],[1766537007000,1.7],[1766537254000,1.6],[1766537565000,1.6],[1766537874000,1.6],[1766538182000,1.7],[1766538491000,1.6],[1766538800000,1.6],[1766539108000,1.6],[1766539355000,1.6],[1766539663000,1.6],[1766539971000,1.6],[1766540280000,1.6],[1766540588000,1.5],[1766540897000,1.5],[1766541205000,1.6],[1766541452000,1.6],[1766541760000,1.5],[1766542068000,1.5],[1766542377000,1.4],[1766542685000,1.5],[1766542993000,1.3],[1766543303000,1.3],[1766543550000,1.2],[1766543858000,1.1],[1766544168000,1.1],[1766544476000,1],[1766544786000,0.9],[1766545094000,0.9],[1766545402000,0.7],[1766545711000,0.7],[1766545957000,0.7],[1766546265000,0.6],[1766546575000,0.6],[1766546883000,0.6],[1766547192000,0.5],[1766547501000,0.5],[1766547809000,0.4],[1766548055000,0.4],[1766548364000,0.4],[1766548672000,0.3],[1766548980000,0.3],[1766549288000,0.2],[1766549596000,0.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() { dataset = [ { label: 'Vlhkosť (%)', data: [[1766530838000,87.10000000],[1766530961000,87.10000000],[1766531269000,87.12000000],[1766531577000,87.14000000],[1766531886000,87.20000000],[1766532195000,87.06000000],[1766532503000,87.10000000],[1766532750000,87.22000000],[1766533058000,87.30000000],[1766533367000,87.20000000],[1766533675000,87.16000000],[1766533984000,86.84000000],[1766534292000,86.82000000],[1766534601000,87.00000000],[1766534909000,87.10000000],[1766535156000,87.02000000],[1766535465000,87.00000000],[1766535773000,87.00000000],[1766536082000,87.10000000],[1766536390000,87.04000000],[1766536699000,87.02000000],[1766537007000,87.10000000],[1766537254000,87.14000000],[1766537565000,87.10000000],[1766537874000,87.20000000],[1766538182000,87.28000000],[1766538491000,87.20000000],[1766538800000,87.26000000],[1766539108000,87.30000000],[1766539355000,87.22000000],[1766539663000,87.30000000],[1766539971000,87.28000000],[1766540280000,87.26000000],[1766540588000,87.30000000],[1766540897000,87.36000000],[1766541205000,87.45000000],[1766541452000,87.38000000],[1766541760000,87.38000000],[1766542068000,87.22000000],[1766542377000,87.20000000],[1766542685000,87.16000000],[1766542993000,86.96000000],[1766543303000,87.00000000],[1766543550000,86.78000000],[1766543858000,86.60000000],[1766544168000,86.64000000],[1766544476000,86.48000000],[1766544786000,86.32000000],[1766545094000,86.26000000],[1766545402000,85.92000000],[1766545711000,86.15000000],[1766545957000,85.96000000],[1766546265000,85.92000000],[1766546575000,85.80000000],[1766546883000,85.66000000],[1766547192000,85.66000000],[1766547501000,85.68000000],[1766547809000,85.57500000],[1766548055000,85.42000000],[1766548364000,85.48000000],[1766548672000,85.20000000],[1766548980000,85.20000000],[1766549288000,85.14000000],[1766549596000,85.24000000],], 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: [[1766530838000,1020.8],[1766530961000,1020.9],[1766531269000,1020.8],[1766531577000,1020.9],[1766531886000,1020.9],[1766532195000,1020.9],[1766532503000,1020.9],[1766532750000,1020.9],[1766533058000,1020.9],[1766533367000,1020.9],[1766533675000,1020.9],[1766533984000,1020.9],[1766534292000,1020.9],[1766534601000,1020.9],[1766534909000,1020.9],[1766535156000,1020.9],[1766535465000,1020.9],[1766535773000,1020.9],[1766536082000,1020.9],[1766536390000,1021],[1766536699000,1020.9],[1766537007000,1020.9],[1766537254000,1020.9],[1766537565000,1020.9],[1766537874000,1021],[1766538182000,1021],[1766538491000,1021.1],[1766538800000,1021.1],[1766539108000,1021.2],[1766539355000,1021.2],[1766539663000,1021.2],[1766539971000,1021.2],[1766540280000,1021.2],[1766540588000,1021.2],[1766540897000,1021.2],[1766541205000,1021.2],[1766541452000,1021.2],[1766541760000,1021.1],[1766542068000,1021.1],[1766542377000,1021],[1766542685000,1021.1],[1766542993000,1021],[1766543303000,1021.1],[1766543550000,1021.1],[1766543858000,1021.1],[1766544168000,1021.2],[1766544476000,1021.1],[1766544786000,1021.2],[1766545094000,1021.2],[1766545402000,1021.2],[1766545711000,1021.1],[1766545957000,1021.2],[1766546265000,1021.1],[1766546575000,1021.1],[1766546883000,1021.1],[1766547192000,1021.1],[1766547501000,1021.1],[1766547809000,1021.1],[1766548055000,1021.1],[1766548364000,1021.1],[1766548672000,1021.1],[1766548980000,1021.1],[1766549288000,1021.1],[1766549596000,1021.1],], 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; }