var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1766098860000,5.10000000],[1766098988000,5.10000000],[1766099308000,5.10000000],[1766099580000,5.10000000],[1766099900000,5.10000000],[1766100156000,5.10000000],[1766100476000,5.10000000],[1766100796000,5.10000000],[1766101068000,5.10000000],[1766101388000,5.10000000],[1766101708000,5.10000000],[1766101951000,5.10000000],[1766102284000,5.10000000],[1766102604000,5.10000000],[1766102860000,5.10000000],[1766103180000,5.18000000],[1766103500000,5.20000000],[1766103756000,5.20000000],[1766104076000,5.20000000],[1766104396000,5.25000000],[1766104651000,5.30000000],[1766104972000,5.30000000],[1766105292000,5.30000000],[1766105611000,5.30000000],[1766105868000,5.30000000],[1766106188000,5.30000000],[1766106508000,5.30000000],[1766106764000,5.30000000],[1766107084000,5.30000000],[1766107404000,5.30000000],[1766107660000,5.30000000],[1766107996000,5.30000000],[1766108252000,5.36000000],[1766108573000,5.40000000],[1766108892000,5.34000000],[1766109212000,5.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1766098860000,4.4],[1766098988000,4.4],[1766099308000,4.4],[1766099580000,4.4],[1766099900000,4.4],[1766100156000,4.4],[1766100476000,4.4],[1766100796000,4.4],[1766101068000,4.4],[1766101388000,4.4],[1766101708000,4.4],[1766101951000,4.4],[1766102284000,4.4],[1766102604000,4.4],[1766102860000,4.4],[1766103180000,4.4],[1766103500000,4.5],[1766103756000,4.5],[1766104076000,4.5],[1766104396000,4.5],[1766104651000,4.6],[1766104972000,4.6],[1766105292000,4.6],[1766105611000,4.6],[1766105868000,4.6],[1766106188000,4.6],[1766106508000,4.6],[1766106764000,4.6],[1766107084000,4.6],[1766107404000,4.6],[1766107660000,4.6],[1766107996000,4.6],[1766108252000,4.6],[1766108573000,4.7],[1766108892000,4.6],[1766109212000,4.7],], 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: [[1766098860000,95.00000000],[1766098988000,95.00000000],[1766099308000,95.00000000],[1766099580000,95.00000000],[1766099900000,95.00000000],[1766100156000,95.00000000],[1766100476000,95.00000000],[1766100796000,95.00000000],[1766101068000,95.00000000],[1766101388000,95.00000000],[1766101708000,95.00000000],[1766101951000,95.00000000],[1766102284000,95.00000000],[1766102604000,95.00000000],[1766102860000,95.00000000],[1766103180000,95.00000000],[1766103500000,95.00000000],[1766103756000,95.00000000],[1766104076000,95.00000000],[1766104396000,95.00000000],[1766104651000,95.00000000],[1766104972000,95.00000000],[1766105292000,95.00000000],[1766105611000,95.00000000],[1766105868000,95.00000000],[1766106188000,95.00000000],[1766106508000,95.00000000],[1766106764000,95.00000000],[1766107084000,95.00000000],[1766107404000,95.00000000],[1766107660000,95.00000000],[1766107996000,95.00000000],[1766108252000,95.00000000],[1766108573000,95.00000000],[1766108892000,95.00000000],[1766109212000,95.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: [[1766098860000,1029.1],[1766098988000,1029.1],[1766099308000,1029.1],[1766099580000,1029],[1766099900000,1029],[1766100156000,1028.9],[1766100476000,1028.8],[1766100796000,1028.7],[1766101068000,1028.7],[1766101388000,1028.7],[1766101708000,1028.7],[1766101951000,1028.7],[1766102284000,1028.6],[1766102604000,1028.5],[1766102860000,1028.5],[1766103180000,1028.3],[1766103500000,1028.4],[1766103756000,1028.5],[1766104076000,1028.5],[1766104396000,1028.4],[1766104651000,1028.3],[1766104972000,1028.3],[1766105292000,1028.3],[1766105611000,1028.2],[1766105868000,1028.4],[1766106188000,1028.3],[1766106508000,1028.4],[1766106764000,1028.3],[1766107084000,1028.3],[1766107404000,1028.3],[1766107660000,1028.2],[1766107996000,1028.1],[1766108252000,1028.1],[1766108573000,1028.2],[1766108892000,1028.1],[1766109212000,1027.9],], 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: 'Rýchlosť vetra (km/h)', data: [[1766098860000,5.04],[1766098988000,4.464],[1766099308000,6.48],[1766099580000,6.696],[1766099900000,4.05],[1766100156000,5.904],[1766100476000,5.544],[1766100796000,4.95],[1766101068000,3.816],[1766101388000,6.84],[1766101708000,4.05],[1766101951000,6.12],[1766102284000,6.336],[1766102604000,5.22],[1766102860000,5.976],[1766103180000,4.752],[1766103500000,4.32],[1766103756000,5.904],[1766104076000,7.56],[1766104396000,6.21],[1766104651000,7.2],[1766104972000,7.128],[1766105292000,6.624],[1766105611000,7.83],[1766105868000,9.432],[1766106188000,9.216],[1766106508000,9.63],[1766106764000,7.776],[1766107084000,10.296],[1766107404000,9.63],[1766107660000,8.424],[1766107996000,11.61],[1766108252000,11.592],[1766108573000,10.008],[1766108892000,12.744],[1766109212000,9.72],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1766098860000,6.3],[1766098988000,6.552],[1766099308000,8.91],[1766099580000,9.72],[1766099900000,5.67],[1766100156000,8.136],[1766100476000,8.136],[1766100796000,7.56],[1766101068000,6.552],[1766101388000,9.144],[1766101708000,5.67],[1766101951000,7.632],[1766102284000,8.64],[1766102604000,6.93],[1766102860000,9.072],[1766103180000,8.136],[1766103500000,5.67],[1766103756000,8.568],[1766104076000,9.144],[1766104396000,8.28],[1766104651000,9.648],[1766104972000,9.72],[1766105292000,9.648],[1766105611000,11.43],[1766105868000,13.752],[1766106188000,13.32],[1766106508000,13.59],[1766106764000,11.232],[1766107084000,14.832],[1766107404000,13.41],[1766107660000,11.232],[1766107996000,18],[1766108252000,17.496],[1766108573000,13.896],[1766108892000,16.92],[1766109212000,14.22],], 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: [[1766098860000,51.50000000],[1766098988000,78.40000000],[1766099308000,66.50000000],[1766099580000,139.00000000],[1766099900000,58.25000000],[1766100156000,62.40000000],[1766100476000,110.60000000],[1766100796000,75.25000000],[1766101068000,74.60000000],[1766101388000,63.60000000],[1766101708000,65.50000000],[1766101951000,71.00000000],[1766102284000,69.00000000],[1766102604000,80.75000000],[1766102860000,143.60000000],[1766103180000,70.40000000],[1766103500000,46.25000000],[1766103756000,75.20000000],[1766104076000,86.60000000],[1766104396000,78.75000000],[1766104651000,91.00000000],[1766104972000,97.60000000],[1766105292000,69.60000000],[1766105611000,111.25000000],[1766105868000,115.00000000],[1766106188000,83.00000000],[1766106508000,94.75000000],[1766106764000,94.60000000],[1766107084000,106.00000000],[1766107404000,111.00000000],[1766107660000,97.40000000],[1766107996000,71.25000000],[1766108252000,98.00000000],[1766108573000,102.20000000],[1766108892000,107.20000000],[1766109212000,108.00000000],], 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: 'Slnečné žiarenie (W/m2)', data: [[1766098860000,0.00000000],[1766098988000,0.00000000],[1766099308000,0.00000000],[1766099580000,0.00000000],[1766099900000,0.00000000],[1766100156000,0.00000000],[1766100476000,0.00000000],[1766100796000,0.00000000],[1766101068000,0.00000000],[1766101388000,0.00000000],[1766101708000,0.00000000],[1766101951000,0.00000000],[1766102284000,0.00000000],[1766102604000,0.00000000],[1766102860000,0.00000000],[1766103180000,0.00000000],[1766103500000,0.00000000],[1766103756000,0.00000000],[1766104076000,0.00000000],[1766104396000,0.00000000],[1766104651000,0.00000000],[1766104972000,0.00000000],[1766105292000,0.00000000],[1766105611000,0.00000000],[1766105868000,0.00000000],[1766106188000,0.00000000],[1766106508000,0.00000000],[1766106764000,0.00000000],[1766107084000,0.00000000],[1766107404000,0.00000000],[1766107660000,0.00000000],[1766107996000,0.00000000],[1766108252000,0.00000000],[1766108573000,0.00000000],[1766108892000,0.00000000],[1766109212000,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: 'UV žiarenie', data: [[1766098860000,0.00000000],[1766098988000,0.00000000],[1766099308000,0.00000000],[1766099580000,0.00000000],[1766099900000,0.00000000],[1766100156000,0.00000000],[1766100476000,0.00000000],[1766100796000,0.00000000],[1766101068000,0.00000000],[1766101388000,0.00000000],[1766101708000,0.00000000],[1766101951000,0.00000000],[1766102284000,0.00000000],[1766102604000,0.00000000],[1766102860000,0.00000000],[1766103180000,0.00000000],[1766103500000,0.00000000],[1766103756000,0.00000000],[1766104076000,0.00000000],[1766104396000,0.00000000],[1766104651000,0.00000000],[1766104972000,0.00000000],[1766105292000,0.00000000],[1766105611000,0.00000000],[1766105868000,0.00000000],[1766106188000,0.00000000],[1766106508000,0.00000000],[1766106764000,0.00000000],[1766107084000,0.00000000],[1766107404000,0.00000000],[1766107660000,0.00000000],[1766107996000,0.00000000],[1766108252000,0.00000000],[1766108573000,0.00000000],[1766108892000,0.00000000],[1766109212000,0.00000000],], color: '#802674' } ]; var options = { xaxes: [{ axisLabel: 'uv', }], 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.0' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-uv-legend' } }; graphs['#chart-uv'] = $.plot('#chart-uv', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1766098860000,0.00000000],[1766098988000,0.00000000],[1766099308000,0.00000000],[1766099580000,0.00000000],[1766099900000,0.00000000],[1766100156000,0.00000000],[1766100476000,0.00000000],[1766100796000,0.00000000],[1766101068000,0.00000000],[1766101388000,0.00000000],[1766101708000,0.00000000],[1766101951000,0.00000000],[1766102284000,0.00000000],[1766102604000,0.00000000],[1766102860000,0.00000000],[1766103180000,0.00000000],[1766103500000,0.00000000],[1766103756000,0.00000000],[1766104076000,0.00000000],[1766104396000,0.00000000],[1766104651000,0.00000000],[1766104972000,0.00000000],[1766105292000,0.00000000],[1766105611000,0.00000000],[1766105868000,0.00000000],[1766106188000,0.00000000],[1766106508000,0.00000000],[1766106764000,0.00000000],[1766107084000,0.00000000],[1766107404000,0.00000000],[1766107660000,0.00000000],[1766107996000,0.00000000],[1766108252000,0.00000000],[1766108573000,0.00000000],[1766108892000,0.00000000],[1766109212000,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; }