var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1771455630000,-2.60000000],[1771455775000,-2.56250000],[1771456078000,-2.50000000],[1771456351000,-2.52500000],[1771456702000,-2.70000000],[1771456974000,-2.77500000],[1771457278000,-2.97142857],[1771457551000,-3.27500000],[1771457902000,-3.64285714],[1771458175000,-3.77500000],[1771458478000,-3.95714286],[1771458750000,-4.11250000],[1771459103000,-4.20000000],[1771459374000,-4.10000000],[1771459679000,-4.20000000],[1771459950000,-4.50000000],[1771460302000,-4.57142857],[1771460575000,-4.28750000],[1771460878000,-4.35714286],[1771461151000,-4.33750000],[1771461502000,-4.22857143],[1771461774000,-3.83750000],[1771462078000,-3.57142857],[1771462350000,-3.37500000],[1771462702000,-2.74000000],[1771462974000,-2.48750000],[1771463278000,-2.34285714],[1771463550000,-2.21250000],[1771463903000,-2.18571429],[1771464174000,-2.05000000],[1771464479000,-1.94285714],[1771464750000,-1.87142857],[1771465102000,-1.80000000],[1771465374000,-1.80000000],[1771465678000,-1.74285714],[1771465950000,-1.70000000],[1771466302000,-1.60000000],[1771466590000,-1.60000000],[1771466878000,-1.54285714],[1771467150000,-1.50000000],[1771467503000,-1.50000000],[1771467774000,-1.50000000],[1771468079000,-1.50000000],[1771468350000,-1.50000000],[1771468702000,-1.50000000],[1771468975000,-1.50000000],[1771469278000,-1.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1771455630000,-2.8],[1771455775000,-2.8],[1771456078000,-2.8],[1771456351000,-2.9],[1771456702000,-3.1],[1771456974000,-3.2],[1771457278000,-3.4],[1771457551000,-3.7],[1771457902000,-4.1],[1771458175000,-4.1],[1771458478000,-4.2],[1771458750000,-4.4],[1771459103000,-4.5],[1771459374000,-4.3],[1771459679000,-4.3],[1771459950000,-4.6],[1771460302000,-4.7],[1771460575000,-4.4],[1771460878000,-4.5],[1771461151000,-4.5],[1771461502000,-4.4],[1771461774000,-4],[1771462078000,-3.7],[1771462350000,-3.5],[1771462702000,-2.9],[1771462974000,-2.6],[1771463278000,-2.6],[1771463550000,-2.5],[1771463903000,-2.6],[1771464174000,-2.5],[1771464479000,-2.5],[1771464750000,-2.6],[1771465102000,-2.5],[1771465374000,-2.6],[1771465678000,-2.6],[1771465950000,-2.6],[1771466302000,-2.6],[1771466590000,-2.6],[1771466878000,-2.6],[1771467150000,-2.6],[1771467503000,-2.6],[1771467774000,-2.5],[1771468079000,-2.5],[1771468350000,-2.5],[1771468702000,-2.5],[1771468975000,-2.5],[1771469278000,-2.5],], 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: [[1771455630000,98.66666667],[1771455775000,98.00000000],[1771456078000,98.00000000],[1771456351000,97.12500000],[1771456702000,97.00000000],[1771456974000,97.00000000],[1771457278000,97.00000000],[1771457551000,97.00000000],[1771457902000,97.00000000],[1771458175000,97.87500000],[1771458478000,98.00000000],[1771458750000,98.00000000],[1771459103000,98.00000000],[1771459374000,98.50000000],[1771459679000,99.00000000],[1771459950000,99.00000000],[1771460302000,99.00000000],[1771460575000,99.00000000],[1771460878000,99.00000000],[1771461151000,99.00000000],[1771461502000,99.00000000],[1771461774000,99.00000000],[1771462078000,99.00000000],[1771462350000,99.00000000],[1771462702000,99.00000000],[1771462974000,99.00000000],[1771463278000,98.42857143],[1771463550000,98.00000000],[1771463903000,97.28571429],[1771464174000,96.75000000],[1771464479000,96.00000000],[1771464750000,95.00000000],[1771465102000,95.00000000],[1771465374000,94.25000000],[1771465678000,94.00000000],[1771465950000,94.00000000],[1771466302000,93.14285714],[1771466590000,93.00000000],[1771466878000,92.42857143],[1771467150000,92.00000000],[1771467503000,92.42857143],[1771467774000,93.00000000],[1771468079000,93.00000000],[1771468350000,93.00000000],[1771468702000,93.00000000],[1771468975000,93.00000000],[1771469278000,93.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: [[1771455630000,1015.2],[1771455775000,1015.3],[1771456078000,1015.2],[1771456351000,1015.2],[1771456702000,1015.1],[1771456974000,1015.1],[1771457278000,1015.1],[1771457551000,1015.1],[1771457902000,1015.1],[1771458175000,1014.9],[1771458478000,1014.9],[1771458750000,1015],[1771459103000,1015],[1771459374000,1014.8],[1771459679000,1014.9],[1771459950000,1015],[1771460302000,1014.9],[1771460575000,1015],[1771460878000,1015],[1771461151000,1014.9],[1771461502000,1014.9],[1771461774000,1014.9],[1771462078000,1014.7],[1771462350000,1014.7],[1771462702000,1014.5],[1771462974000,1014.5],[1771463278000,1014.4],[1771463550000,1014.4],[1771463903000,1014.3],[1771464174000,1014.3],[1771464479000,1014.3],[1771464750000,1014.2],[1771465102000,1014.3],[1771465374000,1014.2],[1771465678000,1014.1],[1771465950000,1014.1],[1771466302000,1014.1],[1771466590000,1014.2],[1771466878000,1014],[1771467150000,1013.9],[1771467503000,1014],[1771467774000,1013.9],[1771468079000,1013.8],[1771468350000,1013.8],[1771468702000,1013.8],[1771468975000,1013.8],[1771469278000,1013.7],], 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: [[1771455630000,0],[1771455775000,0],[1771456078000,0],[1771456351000,0],[1771456702000,0],[1771456974000,0],[1771457278000,0],[1771457551000,0],[1771457902000,0],[1771458175000,0],[1771458478000,0],[1771458750000,0],[1771459103000,0],[1771459374000,0],[1771459679000,0],[1771459950000,0],[1771460302000,0],[1771460575000,0],[1771460878000,0],[1771461151000,0],[1771461502000,0],[1771461774000,0],[1771462078000,0],[1771462350000,0],[1771462702000,0.288],[1771462974000,0.45],[1771463278000,0],[1771463550000,0.045],[1771463903000,0.411428556],[1771464174000,0.225],[1771464479000,0.308571444],[1771464750000,0.051428556],[1771465102000,0.205714296],[1771465374000,0.045],[1771465678000,0.102857148],[1771465950000,1.125],[1771466302000,1.491428556],[1771466590000,1.944],[1771466878000,1.028571444],[1771467150000,0.315],[1771467503000,0.668571444],[1771467774000,0.72],[1771468079000,0.205714296],[1771468350000,1.53],[1771468702000,1.388571444],[1771468975000,1.845],[1771469278000,0],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1771455630000,0],[1771455775000,0],[1771456078000,0],[1771456351000,0],[1771456702000,0],[1771456974000,0],[1771457278000,0],[1771457551000,0],[1771457902000,0],[1771458175000,0],[1771458478000,0],[1771458750000,0],[1771459103000,0],[1771459374000,0],[1771459679000,0],[1771459950000,0],[1771460302000,0],[1771460575000,0],[1771460878000,0],[1771461151000,0],[1771461502000,0],[1771461774000,0],[1771462078000,0],[1771462350000,0],[1771462702000,0.504],[1771462974000,0.945],[1771463278000,0],[1771463550000,0.315],[1771463903000,0.72],[1771464174000,0.945],[1771464479000,1.08],[1771464750000,0.36],[1771465102000,0.36],[1771465374000,0.315],[1771465678000,0.72],[1771465950000,2.52],[1771466302000,2.88],[1771466590000,4.536],[1771466878000,2.88],[1771467150000,1.575],[1771467503000,2.16],[1771467774000,1.89],[1771468079000,1.08],[1771468350000,3.15],[1771468702000,3.24],[1771468975000,3.78],[1771469278000,0],], 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: [[1771455630000,21.33333333],[1771455775000,27.87500000],[1771456078000,34.71428571],[1771456351000,37.12500000],[1771456702000,40.42857143],[1771456974000,37.62500000],[1771457278000,37.00000000],[1771457551000,37.00000000],[1771457902000,37.00000000],[1771458175000,37.00000000],[1771458478000,37.00000000],[1771458750000,37.00000000],[1771459103000,37.00000000],[1771459374000,37.00000000],[1771459679000,37.00000000],[1771459950000,37.00000000],[1771460302000,37.00000000],[1771460575000,37.00000000],[1771460878000,37.00000000],[1771461151000,37.00000000],[1771461502000,37.00000000],[1771461774000,37.00000000],[1771462078000,37.00000000],[1771462350000,38.25000000],[1771462702000,73.00000000],[1771462974000,86.50000000],[1771463278000,63.14285714],[1771463550000,68.12500000],[1771463903000,64.42857143],[1771464174000,116.75000000],[1771464479000,121.00000000],[1771464750000,94.28571429],[1771465102000,82.85714286],[1771465374000,105.87500000],[1771465678000,99.42857143],[1771465950000,107.50000000],[1771466302000,107.71428571],[1771466590000,113.00000000],[1771466878000,143.85714286],[1771467150000,128.50000000],[1771467503000,99.14285714],[1771467774000,94.75000000],[1771468079000,80.28571429],[1771468350000,126.75000000],[1771468702000,73.28571429],[1771468975000,107.00000000],[1771469278000,113.33333333],], 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: [[1771455630000,0.00000000],[1771455775000,0.00000000],[1771456078000,0.00000000],[1771456351000,0.00000000],[1771456702000,0.00000000],[1771456974000,0.00000000],[1771457278000,0.00000000],[1771457551000,0.00000000],[1771457902000,0.00000000],[1771458175000,0.00000000],[1771458478000,0.00000000],[1771458750000,0.00000000],[1771459103000,0.00000000],[1771459374000,0.00000000],[1771459679000,0.00000000],[1771459950000,0.00000000],[1771460302000,0.00000000],[1771460575000,0.00000000],[1771460878000,0.00000000],[1771461151000,0.00000000],[1771461502000,0.00000000],[1771461774000,0.00000000],[1771462078000,0.00000000],[1771462350000,0.00000000],[1771462702000,0.00000000],[1771462974000,0.00000000],[1771463278000,0.00000000],[1771463550000,0.00000000],[1771463903000,0.00000000],[1771464174000,0.00000000],[1771464479000,0.00000000],[1771464750000,0.00000000],[1771465102000,0.00000000],[1771465374000,0.00000000],[1771465678000,0.00000000],[1771465950000,0.00000000],[1771466302000,0.00000000],[1771466590000,0.00000000],[1771466878000,0.00000000],[1771467150000,0.00000000],[1771467503000,0.00000000],[1771467774000,0.00000000],[1771468079000,0.00000000],[1771468350000,0.00000000],[1771468702000,0.00000000],[1771468975000,0.00000000],[1771469278000,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: [[1771455630000,0.00000000],[1771455775000,0.00000000],[1771456078000,0.00000000],[1771456351000,0.00000000],[1771456702000,0.00000000],[1771456974000,0.00000000],[1771457278000,0.00000000],[1771457551000,0.00000000],[1771457902000,0.00000000],[1771458175000,0.00000000],[1771458478000,0.00000000],[1771458750000,0.00000000],[1771459103000,0.00000000],[1771459374000,0.00000000],[1771459679000,0.00000000],[1771459950000,0.00000000],[1771460302000,0.00000000],[1771460575000,0.00000000],[1771460878000,0.00000000],[1771461151000,0.00000000],[1771461502000,0.00000000],[1771461774000,0.00000000],[1771462078000,0.00000000],[1771462350000,0.00000000],[1771462702000,0.00000000],[1771462974000,0.00000000],[1771463278000,0.00000000],[1771463550000,0.00000000],[1771463903000,0.00000000],[1771464174000,0.00000000],[1771464479000,0.00000000],[1771464750000,0.00000000],[1771465102000,0.00000000],[1771465374000,0.00000000],[1771465678000,0.00000000],[1771465950000,0.00000000],[1771466302000,0.00000000],[1771466590000,0.00000000],[1771466878000,0.00000000],[1771467150000,0.00000000],[1771467503000,0.00000000],[1771467774000,0.00000000],[1771468079000,0.00000000],[1771468350000,0.00000000],[1771468702000,0.00000000],[1771468975000,0.00000000],[1771469278000,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: [[1771455630000,0.00000000],[1771455775000,0.00000000],[1771456078000,0.00000000],[1771456351000,0.00000000],[1771456702000,0.00000000],[1771456974000,0.00000000],[1771457278000,0.00000000],[1771457551000,0.00000000],[1771457902000,0.00000000],[1771458175000,0.00000000],[1771458478000,0.00000000],[1771458750000,0.00000000],[1771459103000,0.00000000],[1771459374000,0.00000000],[1771459679000,0.00000000],[1771459950000,0.00000000],[1771460302000,0.00000000],[1771460575000,0.00000000],[1771460878000,0.00000000],[1771461151000,0.00000000],[1771461502000,0.00000000],[1771461774000,0.00000000],[1771462078000,0.00000000],[1771462350000,0.00000000],[1771462702000,0.00000000],[1771462974000,0.00000000],[1771463278000,0.00000000],[1771463550000,0.00000000],[1771463903000,0.00000000],[1771464174000,0.00000000],[1771464479000,0.00000000],[1771464750000,0.00000000],[1771465102000,0.00000000],[1771465374000,0.00000000],[1771465678000,0.00000000],[1771465950000,0.00000000],[1771466302000,0.00000000],[1771466590000,0.00000000],[1771466878000,0.00000000],[1771467150000,0.00000000],[1771467503000,0.00000000],[1771467774000,0.00000000],[1771468079000,0.00000000],[1771468350000,0.00000000],[1771468702000,0.00000000],[1771468975000,0.00000000],[1771469278000,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; }