var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1662766800000,18.00000000],[1662767400000,18.10000000],[1662768000000,18.20000000],[1662768600000,18.10000000],[1662769800000,18.10000000],[1662771600000,18.00000000],[1662772200000,17.80000000],[1662772800000,17.80000000],[1662773400000,17.80000000],[1662774000000,17.60000000],[1662775200000,17.50000000],[1662775800000,17.60000000],[1662776400000,17.50000000],[1662777000000,17.20000000],[1662777600000,17.00000000],[1662778200000,16.90000000],[1662778800000,16.90000000],[1662779400000,16.90000000],[1662780000000,16.90000000],[1662780600000,16.60000000],[1662781200000,16.40000000],[1662782400000,16.20000000],[1662783000000,16.10000000],[1662783600000,16.00000000],[1662784200000,16.00000000],[1662785400000,16.10000000],[1662786600000,16.00000000],[1662787200000,16.00000000],[1662787800000,16.10000000],[1662788400000,16.00000000],[1662789000000,16.00000000],[1662789600000,16.10000000],[1662790800000,16.20000000],[1662791400000,16.20000000],[1662792000000,16.30000000],[1662792600000,16.50000000],[1662793200000,16.50000000],[1662793800000,16.80000000],[1662795000000,17.60000000],[1662795600000,18.00000000],[1662796800000,18.20000000],[1662798000000,18.90000000],[1662799800000,18.90000000],[1662822000000,21.20000000],[1662828600000,16.60000000],[1662832200000,15.90000000],[1662836400000,14.90000000],[1662837600000,14.70000000],[1662838800000,14.90000000],[1662840000000,14.80000000],[1662840600000,14.60000000],[1662843000000,14.40000000],[1662844800000,14.10000000],[1662845400000,13.80000000],[1662846000000,13.80000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1662766800000,15.3],[1662767400000,15.4],[1662768000000,15.6],[1662768600000,15.6],[1662769800000,15.6],[1662771600000,15.6],[1662772200000,15.5],[1662772800000,15.6],[1662773400000,15.7],[1662774000000,15.5],[1662775200000,15.3],[1662775800000,15.4],[1662776400000,15.3],[1662777000000,14.9],[1662777600000,14.7],[1662778200000,14.7],[1662778800000,14.6],[1662779400000,14.3],[1662780000000,14.2],[1662780600000,14],[1662781200000,14],[1662782400000,13.9],[1662783000000,13.8],[1662783600000,13.7],[1662784200000,13.6],[1662785400000,13.6],[1662786600000,13.5],[1662787200000,13.4],[1662787800000,13.5],[1662788400000,13.4],[1662789000000,13.5],[1662789600000,13.6],[1662790800000,13.8],[1662791400000,13.9],[1662792000000,14],[1662792600000,14.1],[1662793200000,14],[1662793800000,14.3],[1662795000000,14.7],[1662795600000,14.9],[1662796800000,14.8],[1662798000000,15.2],[1662799800000,14.9],[1662822000000,12],[1662828600000,10.5],[1662832200000,11.2],[1662836400000,10.9],[1662837600000,11],[1662838800000,11.1],[1662840000000,11],[1662840600000,10.9],[1662843000000,10.7],[1662844800000,10.7],[1662845400000,10.6],[1662846000000,10.8],], 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: [[1662766800000,84.20000000],[1662767400000,84.60000000],[1662768000000,84.80000000],[1662768600000,85.20000000],[1662769800000,85.40000000],[1662771600000,86.20000000],[1662772200000,86.60000000],[1662772800000,87.00000000],[1662773400000,87.40000000],[1662774000000,87.40000000],[1662775200000,87.00000000],[1662775800000,87.20000000],[1662776400000,87.00000000],[1662777000000,86.20000000],[1662777600000,86.60000000],[1662778200000,86.80000000],[1662778800000,86.20000000],[1662779400000,85.00000000],[1662780000000,84.40000000],[1662780600000,85.00000000],[1662781200000,85.60000000],[1662782400000,86.40000000],[1662783000000,86.20000000],[1662783600000,86.40000000],[1662784200000,86.00000000],[1662785400000,85.20000000],[1662786600000,85.00000000],[1662787200000,84.80000000],[1662787800000,84.80000000],[1662788400000,84.80000000],[1662789000000,85.00000000],[1662789600000,85.20000000],[1662790800000,85.60000000],[1662791400000,86.20000000],[1662792000000,86.20000000],[1662792600000,86.00000000],[1662793200000,85.40000000],[1662793800000,85.20000000],[1662795000000,83.20000000],[1662795600000,82.20000000],[1662796800000,80.60000000],[1662798000000,79.20000000],[1662799800000,77.80000000],[1662822000000,56.00000000],[1662828600000,67.60000000],[1662832200000,74.00000000],[1662836400000,77.40000000],[1662837600000,78.60000000],[1662838800000,78.40000000],[1662840000000,78.40000000],[1662840600000,78.60000000],[1662843000000,78.80000000],[1662844800000,80.00000000],[1662845400000,81.20000000],[1662846000000,82.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: [[1662766800000,1013.4],[1662767400000,1013.4],[1662768000000,1013.4],[1662768600000,1013.4],[1662769800000,1013.3],[1662771600000,1013.2],[1662772200000,1013.2],[1662772800000,1013.1],[1662773400000,1013],[1662774000000,1012.9],[1662775200000,1012.7],[1662775800000,1012.5],[1662776400000,1012.5],[1662777000000,1012.5],[1662777600000,1012.5],[1662778200000,1012.5],[1662778800000,1012.5],[1662779400000,1012.4],[1662780000000,1012.4],[1662780600000,1012.4],[1662781200000,1012.3],[1662782400000,1012.2],[1662783000000,1012.2],[1662783600000,1012.3],[1662784200000,1012.4],[1662785400000,1012.4],[1662786600000,1012.5],[1662787200000,1012.6],[1662787800000,1012.7],[1662788400000,1012.8],[1662789000000,1012.9],[1662789600000,1012.9],[1662790800000,1012.9],[1662791400000,1013],[1662792000000,1013],[1662792600000,1012.8],[1662793200000,1012.8],[1662793800000,1012.7],[1662795000000,1012.7],[1662795600000,1012.6],[1662796800000,1012.7],[1662798000000,1012.5],[1662799800000,1012.7],[1662822000000,1012.4],[1662828600000,1013.1],[1662832200000,1013.5],[1662836400000,1014.2],[1662837600000,1014.1],[1662838800000,1014.1],[1662840000000,1014],[1662840600000,1014],[1662843000000,1014.2],[1662844800000,1014.4],[1662845400000,1014.5],[1662846000000,1014.5],], 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: 'Slnečné žiarenie (W/m2)', data: [[1662766800000,0.00000000],[1662767400000,0.00000000],[1662768000000,0.00000000],[1662768600000,0.00000000],[1662769800000,0.00000000],[1662771600000,0.00000000],[1662772200000,0.00000000],[1662772800000,0.00000000],[1662773400000,0.00000000],[1662774000000,0.00000000],[1662775200000,0.00000000],[1662775800000,0.00000000],[1662776400000,0.00000000],[1662777000000,0.00000000],[1662777600000,0.00000000],[1662778200000,0.00000000],[1662778800000,0.00000000],[1662779400000,0.00000000],[1662780000000,0.00000000],[1662780600000,0.00000000],[1662781200000,0.00000000],[1662782400000,0.00000000],[1662783000000,0.00000000],[1662783600000,0.00000000],[1662784200000,0.00000000],[1662785400000,4.00000000],[1662786600000,14.00000000],[1662787200000,20.00000000],[1662787800000,20.00000000],[1662788400000,30.00000000],[1662789000000,38.00000000],[1662789600000,42.00000000],[1662790800000,54.00000000],[1662791400000,72.00000000],[1662792000000,88.00000000],[1662792600000,86.00000000],[1662793200000,78.00000000],[1662793800000,208.00000000],[1662795000000,206.00000000],[1662795600000,228.00000000],[1662796800000,316.00000000],[1662798000000,276.00000000],[1662799800000,190.00000000],[1662822000000,276.00000000],[1662828600000,8.00000000],[1662832200000,0.00000000],[1662836400000,0.00000000],[1662837600000,0.00000000],[1662838800000,0.00000000],[1662840000000,0.00000000],[1662840600000,0.00000000],[1662843000000,0.00000000],[1662844800000,0.00000000],[1662845400000,0.00000000],[1662846000000,0.00000000],], color: '#ffb92f' } ]; var options = { xaxes: [{ axisLabel: 'solar_radiation', }], 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.1W/m2' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-solar-radiation-legend' } }; graphs['#chart-solar-radiation'] = $.plot('#chart-solar-radiation', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1662766800000,0.00000000],[1662767400000,0.00000000],[1662768000000,0.00000000],[1662768600000,0.00000000],[1662769800000,0.00000000],[1662771600000,0.00000000],[1662772200000,0.00000000],[1662772800000,0.00000000],[1662773400000,0.00000000],[1662774000000,0.00000000],[1662775200000,0.00000000],[1662775800000,0.00000000],[1662776400000,0.00000000],[1662777000000,0.00000000],[1662777600000,0.00000000],[1662778200000,0.00000000],[1662778800000,0.00000000],[1662779400000,0.00000000],[1662780000000,0.00000000],[1662780600000,0.00000000],[1662781200000,0.00000000],[1662782400000,0.00000000],[1662783000000,0.00000000],[1662783600000,0.00000000],[1662784200000,0.00000000],[1662785400000,0.00000000],[1662786600000,0.00000000],[1662787200000,0.00000000],[1662787800000,0.00000000],[1662788400000,0.00000000],[1662789000000,0.00000000],[1662789600000,0.00000000],[1662790800000,0.00000000],[1662791400000,0.00000000],[1662792000000,0.00000000],[1662792600000,0.00000000],[1662793200000,0.00000000],[1662793800000,0.00000000],[1662795000000,0.00000000],[1662795600000,0.00000000],[1662796800000,0.00000000],[1662798000000,0.00000000],[1662799800000,0.00000000],[1662822000000,0.00000000],[1662828600000,0.28000000],[1662832200000,0.00000000],[1662836400000,0.00000000],[1662837600000,0.00000000],[1662838800000,0.00000000],[1662840000000,0.00000000],[1662840600000,0.00000000],[1662843000000,0.00000000],[1662844800000,0.00000000],[1662845400000,0.00000000],[1662846000000,0.00000000],], 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; }