var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1662847800000,13.80000000],[1662850200000,14.10000000],[1662851400000,14.10000000],[1662852000000,14.00000000],[1662852600000,13.80000000],[1662854400000,13.70000000],[1662855000000,13.70000000],[1662855600000,13.50000000],[1662857400000,12.10000000],[1662858600000,12.20000000],[1662859800000,12.20000000],[1662860400000,12.30000000],[1662861000000,12.30000000],[1662864000000,12.00000000],[1662865200000,12.80000000],[1662868200000,12.40000000],[1662870000000,12.70000000],[1662870600000,12.90000000],[1662873000000,11.90000000],[1662875400000,11.10000000],[1662876600000,11.80000000],[1662882600000,15.50000000],[1662896400000,18.10000000],[1662903000000,19.70000000],[1662903600000,19.50000000],[1662904200000,19.90000000],[1662904800000,18.80000000],[1662906000000,16.70000000],[1662906600000,17.40000000],[1662907800000,18.00000000],[1662909000000,17.70000000],[1662909600000,17.30000000],[1662911400000,16.10000000],[1662912000000,15.80000000],[1662912600000,15.70000000],[1662913200000,15.50000000],[1662913800000,15.20000000],[1662914400000,15.10000000],[1662915000000,14.70000000],[1662915600000,14.30000000],[1662916200000,14.20000000],[1662916800000,14.10000000],[1662917400000,14.10000000],[1662918000000,14.10000000],[1662918600000,14.10000000],[1662919200000,14.10000000],[1662919800000,14.00000000],[1662920400000,13.90000000],[1662921000000,13.80000000],[1662921600000,13.80000000],[1662922200000,13.70000000],[1662922800000,13.80000000],[1662923400000,13.80000000],[1662924000000,13.80000000],[1662924600000,13.70000000],[1662925200000,13.50000000],[1662925800000,13.50000000],[1662926400000,13.50000000],[1662927600000,13.60000000],[1662928200000,13.50000000],[1662928800000,13.50000000],[1662929400000,13.40000000],[1662930000000,13.30000000],[1662930600000,13.30000000],[1662931200000,13.30000000],[1662932400000,13.30000000],[1662933600000,13.00000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1662847800000,10.8],[1662850200000,11.3],[1662851400000,11.2],[1662852000000,11.2],[1662852600000,11],[1662854400000,11],[1662855000000,11],[1662855600000,10.8],[1662857400000,10],[1662858600000,10.3],[1662859800000,10.3],[1662860400000,10.4],[1662861000000,10.5],[1662864000000,10.4],[1662865200000,11],[1662868200000,10.7],[1662870000000,10.9],[1662870600000,11],[1662873000000,9.7],[1662875400000,9.7],[1662876600000,10.5],[1662882600000,13.4],[1662896400000,13.1],[1662903000000,12.9],[1662903600000,12.9],[1662904200000,13.3],[1662904800000,12.6],[1662906000000,13],[1662906600000,14.1],[1662907800000,14.2],[1662909000000,14.2],[1662909600000,13.8],[1662911400000,13.1],[1662912000000,12.9],[1662912600000,12.9],[1662913200000,12.6],[1662913800000,12.3],[1662914400000,12.1],[1662915000000,11.7],[1662915600000,11.3],[1662916200000,11.2],[1662916800000,11.1],[1662917400000,11.2],[1662918000000,11.2],[1662918600000,11.2],[1662919200000,11.2],[1662919800000,11.1],[1662920400000,11.1],[1662921000000,11.2],[1662921600000,11.2],[1662922200000,11.2],[1662922800000,11.3],[1662923400000,11.3],[1662924000000,11.2],[1662924600000,11.2],[1662925200000,11.1],[1662925800000,11.1],[1662926400000,11.1],[1662927600000,11.3],[1662928200000,11.2],[1662928800000,11.3],[1662929400000,11.2],[1662930000000,11.1],[1662930600000,11.1],[1662931200000,11.1],[1662932400000,11.1],[1662933600000,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: [[1662847800000,82.20000000],[1662850200000,83.20000000],[1662851400000,83.00000000],[1662852000000,83.20000000],[1662852600000,83.40000000],[1662854400000,83.80000000],[1662855000000,83.80000000],[1662855600000,83.80000000],[1662857400000,87.00000000],[1662858600000,88.00000000],[1662859800000,88.40000000],[1662860400000,88.40000000],[1662861000000,88.60000000],[1662864000000,90.00000000],[1662865200000,89.00000000],[1662868200000,89.40000000],[1662870000000,89.00000000],[1662870600000,88.60000000],[1662873000000,86.80000000],[1662875400000,91.00000000],[1662876600000,91.60000000],[1662882600000,87.20000000],[1662896400000,72.60000000],[1662903000000,65.20000000],[1662903600000,66.00000000],[1662904200000,65.80000000],[1662904800000,67.60000000],[1662906000000,78.80000000],[1662906600000,81.00000000],[1662907800000,78.60000000],[1662909000000,80.20000000],[1662909600000,80.00000000],[1662911400000,82.40000000],[1662912000000,83.00000000],[1662912600000,83.40000000],[1662913200000,83.20000000],[1662913800000,83.00000000],[1662914400000,82.60000000],[1662915000000,82.40000000],[1662915600000,82.20000000],[1662916200000,82.20000000],[1662916800000,82.40000000],[1662917400000,82.60000000],[1662918000000,82.80000000],[1662918600000,83.00000000],[1662919200000,82.80000000],[1662919800000,83.00000000],[1662920400000,83.60000000],[1662921000000,84.20000000],[1662921600000,84.60000000],[1662922200000,84.80000000],[1662922800000,85.00000000],[1662923400000,84.80000000],[1662924000000,84.60000000],[1662924600000,85.00000000],[1662925200000,85.40000000],[1662925800000,85.80000000],[1662926400000,85.80000000],[1662927600000,86.00000000],[1662928200000,86.20000000],[1662928800000,86.40000000],[1662929400000,86.60000000],[1662930000000,86.80000000],[1662930600000,86.60000000],[1662931200000,86.40000000],[1662932400000,86.40000000],[1662933600000,86.40000000],], 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: [[1662847800000,1014.4],[1662850200000,1014.2],[1662851400000,1014.2],[1662852000000,1014.2],[1662852600000,1014.2],[1662854400000,1014.3],[1662855000000,1014.3],[1662855600000,1014.4],[1662857400000,1014.6],[1662858600000,1014.4],[1662859800000,1014.4],[1662860400000,1014.3],[1662861000000,1014.3],[1662864000000,1014.1],[1662865200000,1013.8],[1662868200000,1014],[1662870000000,1014],[1662870600000,1014.1],[1662873000000,1014.2],[1662875400000,1014.4],[1662876600000,1014.4],[1662882600000,1013.9],[1662896400000,1013.2],[1662903000000,1012.5],[1662903600000,1012.6],[1662904200000,1012.5],[1662904800000,1012.8],[1662906000000,1013.2],[1662906600000,1013],[1662907800000,1012.8],[1662909000000,1013],[1662909600000,1013.1],[1662911400000,1013.8],[1662912000000,1013.9],[1662912600000,1013.9],[1662913200000,1013.8],[1662913800000,1013.9],[1662914400000,1013.8],[1662915000000,1013.8],[1662915600000,1013.8],[1662916200000,1013.8],[1662916800000,1013.8],[1662917400000,1013.8],[1662918000000,1013.9],[1662918600000,1013.9],[1662919200000,1014],[1662919800000,1014.2],[1662920400000,1014.3],[1662921000000,1014.4],[1662921600000,1014.4],[1662922200000,1014.4],[1662922800000,1014.5],[1662923400000,1014.5],[1662924000000,1014.5],[1662924600000,1014.6],[1662925200000,1014.6],[1662925800000,1014.5],[1662926400000,1014.5],[1662927600000,1014.5],[1662928200000,1014.6],[1662928800000,1014.6],[1662929400000,1014.5],[1662930000000,1014.6],[1662930600000,1014.7],[1662931200000,1014.8],[1662932400000,1015],[1662933600000,1015.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); }); $(document).ready(function() { dataset = [ { label: 'Slnečné žiarenie (W/m2)', data: [[1662847800000,0.00000000],[1662850200000,0.00000000],[1662851400000,0.00000000],[1662852000000,0.00000000],[1662852600000,0.00000000],[1662854400000,0.00000000],[1662855000000,0.00000000],[1662855600000,0.00000000],[1662857400000,0.00000000],[1662858600000,0.00000000],[1662859800000,0.00000000],[1662860400000,0.00000000],[1662861000000,0.00000000],[1662864000000,0.00000000],[1662865200000,0.00000000],[1662868200000,0.00000000],[1662870000000,6.00000000],[1662870600000,10.00000000],[1662873000000,62.00000000],[1662875400000,46.00000000],[1662876600000,76.00000000],[1662882600000,156.00000000],[1662896400000,200.00000000],[1662903000000,472.00000000],[1662903600000,450.00000000],[1662904200000,352.00000000],[1662904800000,104.00000000],[1662906000000,262.00000000],[1662906600000,458.00000000],[1662907800000,250.00000000],[1662909000000,90.00000000],[1662909600000,86.00000000],[1662911400000,30.00000000],[1662912000000,38.00000000],[1662912600000,46.00000000],[1662913200000,34.00000000],[1662913800000,46.00000000],[1662914400000,54.00000000],[1662915000000,22.00000000],[1662915600000,12.00000000],[1662916200000,6.00000000],[1662916800000,2.00000000],[1662917400000,0.00000000],[1662918000000,0.00000000],[1662918600000,0.00000000],[1662919200000,0.00000000],[1662919800000,0.00000000],[1662920400000,0.00000000],[1662921000000,0.00000000],[1662921600000,0.00000000],[1662922200000,0.00000000],[1662922800000,0.00000000],[1662923400000,0.00000000],[1662924000000,0.00000000],[1662924600000,0.00000000],[1662925200000,0.00000000],[1662925800000,0.00000000],[1662926400000,0.00000000],[1662927600000,0.00000000],[1662928200000,0.00000000],[1662928800000,0.00000000],[1662929400000,0.00000000],[1662930000000,0.00000000],[1662930600000,0.00000000],[1662931200000,0.00000000],[1662932400000,0.00000000],[1662933600000,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: [[1662847800000,0.00000000],[1662850200000,0.00000000],[1662851400000,0.00000000],[1662852000000,0.00000000],[1662852600000,0.00000000],[1662854400000,0.00000000],[1662855000000,0.00000000],[1662855600000,0.00000000],[1662857400000,0.00000000],[1662858600000,0.00000000],[1662859800000,0.00000000],[1662860400000,0.00000000],[1662861000000,0.00000000],[1662864000000,0.00000000],[1662865200000,0.00000000],[1662868200000,0.00000000],[1662870000000,0.00000000],[1662870600000,0.00000000],[1662873000000,0.00000000],[1662875400000,0.00000000],[1662876600000,0.00000000],[1662882600000,0.00000000],[1662896400000,0.00000000],[1662903000000,0.00000000],[1662903600000,0.00000000],[1662904200000,0.00000000],[1662904800000,0.28000000],[1662906000000,0.56000000],[1662906600000,0.00000000],[1662907800000,0.00000000],[1662909000000,0.00000000],[1662909600000,0.00000000],[1662911400000,0.28000000],[1662912000000,0.00000000],[1662912600000,0.00000000],[1662913200000,0.00000000],[1662913800000,0.00000000],[1662914400000,0.00000000],[1662915000000,0.00000000],[1662915600000,0.00000000],[1662916200000,0.00000000],[1662916800000,0.00000000],[1662917400000,0.00000000],[1662918000000,0.00000000],[1662918600000,0.00000000],[1662919200000,0.28000000],[1662919800000,0.00000000],[1662920400000,0.00000000],[1662921000000,0.00000000],[1662921600000,0.00000000],[1662922200000,0.00000000],[1662922800000,0.00000000],[1662923400000,0.00000000],[1662924000000,0.00000000],[1662924600000,0.00000000],[1662925200000,0.00000000],[1662925800000,0.00000000],[1662926400000,0.00000000],[1662927600000,0.00000000],[1662928200000,0.00000000],[1662928800000,0.00000000],[1662929400000,0.00000000],[1662930000000,0.00000000],[1662930600000,0.00000000],[1662931200000,0.00000000],[1662932400000,0.00000000],[1662933600000,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; }