var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1771887641000,5.80000000],[1771887769000,5.80000000],[1771888089000,5.74000000],[1771888409000,5.57500000],[1771888665000,5.86000000],[1771888985000,5.90000000],[1771889252000,5.98000000],[1771889561000,6.00000000],[1771889881000,6.00000000],[1771890202000,6.00000000],[1771890458000,6.10000000],[1771890777000,6.30000000],[1771891097000,6.45000000],[1771891353000,6.56000000],[1771891690000,6.68000000],[1771892009000,6.70000000],[1771892265000,6.70000000],[1771892585000,6.60000000],[1771892913000,6.65000000],[1771893176000,6.70000000],[1771893498000,6.60000000],[1771893755000,6.56000000],[1771894090000,6.30000000],[1771894410000,5.97500000],[1771894665000,5.90000000],[1771895000000,5.67500000],[1771895253000,5.42000000],[1771895576000,5.22000000],[1771895896000,5.12500000],[1771896152000,5.14000000],[1771896472000,5.10000000],[1771896792000,5.08000000],[1771897112000,4.85000000],[1771897368000,4.70000000],[1771897691000,4.70000000],[1771898012000,5.17500000],[1771898265000,5.42000000],[1771898585000,5.72000000],[1771898907000,5.87500000],[1771899163000,5.90000000],[1771899481000,5.90000000],[1771899801000,5.80000000],[1771900057000,5.80000000],[1771900377000,5.72000000],[1771900698000,5.72500000],[1771900954000,5.88000000],[1771901274000,6.02000000],[1771901594000,6.10000000],[1771901851000,6.14000000],[1771902170000,6.12000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1771887641000,5.7],[1771887769000,5.7],[1771888089000,5.6],[1771888409000,5.4],[1771888665000,5.7],[1771888985000,5.8],[1771889252000,5.8],[1771889561000,5.9],[1771889881000,5.9],[1771890202000,5.9],[1771890458000,6],[1771890777000,6.1],[1771891097000,6.1],[1771891353000,6],[1771891690000,5.9],[1771892009000,5.9],[1771892265000,5.9],[1771892585000,5.8],[1771892913000,5.7],[1771893176000,5.8],[1771893498000,5.5],[1771893755000,5.5],[1771894090000,5.4],[1771894410000,5.1],[1771894665000,5.2],[1771895000000,5],[1771895253000,4.8],[1771895576000,4.6],[1771895896000,4.6],[1771896152000,4.7],[1771896472000,4.7],[1771896792000,4.7],[1771897112000,4.4],[1771897368000,4.4],[1771897691000,4.4],[1771898012000,4.9],[1771898265000,4.9],[1771898585000,4.8],[1771898907000,4.8],[1771899163000,4.7],[1771899481000,4.7],[1771899801000,4.6],[1771900057000,4.6],[1771900377000,4.5],[1771900698000,4.3],[1771900954000,4.3],[1771901274000,4.5],[1771901594000,4.4],[1771901851000,4.4],[1771902170000,4.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: [[1771887641000,99.00000000],[1771887769000,99.00000000],[1771888089000,99.00000000],[1771888409000,99.00000000],[1771888665000,99.00000000],[1771888985000,99.00000000],[1771889252000,99.00000000],[1771889561000,99.00000000],[1771889881000,99.00000000],[1771890202000,99.00000000],[1771890458000,99.00000000],[1771890777000,98.60000000],[1771891097000,97.50000000],[1771891353000,96.20000000],[1771891690000,95.00000000],[1771892009000,95.00000000],[1771892265000,94.80000000],[1771892585000,95.00000000],[1771892913000,94.00000000],[1771893176000,93.80000000],[1771893498000,93.00000000],[1771893755000,93.00000000],[1771894090000,94.00000000],[1771894410000,94.50000000],[1771894665000,95.00000000],[1771895000000,95.50000000],[1771895253000,96.00000000],[1771895576000,96.00000000],[1771895896000,96.75000000],[1771896152000,97.00000000],[1771896472000,97.00000000],[1771896792000,97.20000000],[1771897112000,97.25000000],[1771897368000,98.00000000],[1771897691000,98.00000000],[1771898012000,98.00000000],[1771898265000,96.40000000],[1771898585000,94.00000000],[1771898907000,93.00000000],[1771899163000,92.40000000],[1771899481000,92.00000000],[1771899801000,92.00000000],[1771900057000,92.00000000],[1771900377000,92.00000000],[1771900698000,90.75000000],[1771900954000,90.00000000],[1771901274000,89.80000000],[1771901594000,89.00000000],[1771901851000,89.00000000],[1771902170000,89.20000000],], 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: [[1771887641000,1013.4],[1771887769000,1013.3],[1771888089000,1013.4],[1771888409000,1013.4],[1771888665000,1013.4],[1771888985000,1013.4],[1771889252000,1013.5],[1771889561000,1013.5],[1771889881000,1013.5],[1771890202000,1013.4],[1771890458000,1013.4],[1771890777000,1013.4],[1771891097000,1013.4],[1771891353000,1013.6],[1771891690000,1013.6],[1771892009000,1013.8],[1771892265000,1013.6],[1771892585000,1013.2],[1771892913000,1013.2],[1771893176000,1013.1],[1771893498000,1013],[1771893755000,1012.8],[1771894090000,1012.7],[1771894410000,1012.6],[1771894665000,1012.5],[1771895000000,1012.5],[1771895253000,1012.6],[1771895576000,1012.6],[1771895896000,1012.7],[1771896152000,1012.8],[1771896472000,1012.6],[1771896792000,1012.5],[1771897112000,1012.6],[1771897368000,1012.5],[1771897691000,1012.4],[1771898012000,1012.5],[1771898265000,1012.4],[1771898585000,1012.4],[1771898907000,1012.3],[1771899163000,1012.3],[1771899481000,1012.1],[1771899801000,1012],[1771900057000,1011.9],[1771900377000,1011.9],[1771900698000,1012.1],[1771900954000,1012.1],[1771901274000,1012.1],[1771901594000,1012],[1771901851000,1012.1],[1771902170000,1012.2],], 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: [[1771887641000,0.18],[1771887769000,1.512],[1771888089000,0],[1771888409000,0.9],[1771888665000,1.224],[1771888985000,1.08],[1771889252000,0.432],[1771889561000,1.944],[1771889881000,1.224],[1771890202000,1.35],[1771890458000,3.6],[1771890777000,6.264],[1771891097000,6.93],[1771891353000,3.96],[1771891690000,3.384],[1771892009000,1.17],[1771892265000,0],[1771892585000,2.016],[1771892913000,3.6],[1771893176000,1.584],[1771893498000,3.15],[1771893755000,0.936],[1771894090000,0.144],[1771894410000,0],[1771894665000,1.512],[1771895000000,0],[1771895253000,0],[1771895576000,0],[1771895896000,0],[1771896152000,0],[1771896472000,0],[1771896792000,0.072],[1771897112000,0.09],[1771897368000,0],[1771897691000,0.576],[1771898012000,2.97],[1771898265000,6.048],[1771898585000,5.904],[1771898907000,5.13],[1771899163000,3.672],[1771899481000,1.44],[1771899801000,5.4],[1771900057000,6.192],[1771900377000,3.528],[1771900698000,6.93],[1771900954000,4.968],[1771901274000,8.496],[1771901594000,7.11],[1771901851000,8.28],[1771902170000,6.48],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1771887641000,1.26],[1771887769000,2.52],[1771888089000,0],[1771888409000,1.89],[1771888665000,3.024],[1771888985000,1.26],[1771889252000,0.504],[1771889561000,3.024],[1771889881000,1.512],[1771890202000,1.89],[1771890458000,4.536],[1771890777000,7.56],[1771891097000,9.54],[1771891353000,5.04],[1771891690000,4.032],[1771892009000,2.52],[1771892265000,0],[1771892585000,3.024],[1771892913000,4.41],[1771893176000,2.016],[1771893498000,3.78],[1771893755000,2.016],[1771894090000,1.008],[1771894410000,0],[1771894665000,2.016],[1771895000000,0],[1771895253000,0],[1771895576000,0],[1771895896000,0],[1771896152000,0],[1771896472000,0],[1771896792000,0.504],[1771897112000,0.63],[1771897368000,0],[1771897691000,1.008],[1771898012000,3.78],[1771898265000,7.632],[1771898585000,8.064],[1771898907000,6.93],[1771899163000,5.04],[1771899481000,3.024],[1771899801000,6.93],[1771900057000,8.064],[1771900377000,4.032],[1771900698000,8.91],[1771900954000,7.128],[1771901274000,10.728],[1771901594000,8.82],[1771901851000,10.728],[1771902170000,7.56],], 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: [[1771887641000,181.50000000],[1771887769000,325.60000000],[1771888089000,72.80000000],[1771888409000,346.50000000],[1771888665000,348.80000000],[1771888985000,343.75000000],[1771889252000,338.20000000],[1771889561000,265.00000000],[1771889881000,332.40000000],[1771890202000,341.25000000],[1771890458000,320.00000000],[1771890777000,286.80000000],[1771891097000,282.25000000],[1771891353000,305.80000000],[1771891690000,299.60000000],[1771892009000,328.00000000],[1771892265000,215.40000000],[1771892585000,189.20000000],[1771892913000,312.50000000],[1771893176000,268.00000000],[1771893498000,339.75000000],[1771893755000,338.20000000],[1771894090000,70.20000000],[1771894410000,88.25000000],[1771894665000,206.20000000],[1771895000000,3.50000000],[1771895253000,3.60000000],[1771895576000,5.00000000],[1771895896000,5.75000000],[1771896152000,6.00000000],[1771896472000,209.20000000],[1771896792000,212.40000000],[1771897112000,89.75000000],[1771897368000,5.20000000],[1771897691000,204.20000000],[1771898012000,314.75000000],[1771898265000,282.60000000],[1771898585000,273.00000000],[1771898907000,301.50000000],[1771899163000,229.00000000],[1771899481000,326.60000000],[1771899801000,306.25000000],[1771900057000,316.40000000],[1771900377000,311.40000000],[1771900698000,293.00000000],[1771900954000,302.40000000],[1771901274000,266.20000000],[1771901594000,273.75000000],[1771901851000,297.60000000],[1771902170000,284.80000000],], 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: [[1771887641000,0.00000000],[1771887769000,0.00000000],[1771888089000,0.00000000],[1771888409000,0.00000000],[1771888665000,0.00000000],[1771888985000,0.00000000],[1771889252000,0.00000000],[1771889561000,0.00000000],[1771889881000,0.00000000],[1771890202000,0.00000000],[1771890458000,0.00000000],[1771890777000,0.00000000],[1771891097000,0.00000000],[1771891353000,0.00000000],[1771891690000,0.00000000],[1771892009000,0.00000000],[1771892265000,0.00000000],[1771892585000,0.00000000],[1771892913000,0.00000000],[1771893176000,0.00000000],[1771893498000,0.00000000],[1771893755000,0.00000000],[1771894090000,0.00000000],[1771894410000,0.00000000],[1771894665000,0.00000000],[1771895000000,0.00000000],[1771895253000,0.00000000],[1771895576000,0.00000000],[1771895896000,0.00000000],[1771896152000,0.00000000],[1771896472000,0.00000000],[1771896792000,0.00000000],[1771897112000,0.00000000],[1771897368000,0.00000000],[1771897691000,0.00000000],[1771898012000,0.00000000],[1771898265000,0.00000000],[1771898585000,0.00000000],[1771898907000,0.00000000],[1771899163000,0.00000000],[1771899481000,0.00000000],[1771899801000,0.00000000],[1771900057000,0.00000000],[1771900377000,0.00000000],[1771900698000,0.00000000],[1771900954000,0.00000000],[1771901274000,0.00000000],[1771901594000,0.00000000],[1771901851000,0.00000000],[1771902170000,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: [[1771887641000,0.00000000],[1771887769000,0.00000000],[1771888089000,0.00000000],[1771888409000,0.00000000],[1771888665000,0.00000000],[1771888985000,0.00000000],[1771889252000,0.00000000],[1771889561000,0.00000000],[1771889881000,0.00000000],[1771890202000,0.00000000],[1771890458000,0.00000000],[1771890777000,0.00000000],[1771891097000,0.00000000],[1771891353000,0.00000000],[1771891690000,0.00000000],[1771892009000,0.00000000],[1771892265000,0.00000000],[1771892585000,0.00000000],[1771892913000,0.00000000],[1771893176000,0.00000000],[1771893498000,0.00000000],[1771893755000,0.00000000],[1771894090000,0.00000000],[1771894410000,0.00000000],[1771894665000,0.00000000],[1771895000000,0.00000000],[1771895253000,0.00000000],[1771895576000,0.00000000],[1771895896000,0.00000000],[1771896152000,0.00000000],[1771896472000,0.00000000],[1771896792000,0.00000000],[1771897112000,0.00000000],[1771897368000,0.00000000],[1771897691000,0.00000000],[1771898012000,0.00000000],[1771898265000,0.00000000],[1771898585000,0.00000000],[1771898907000,0.00000000],[1771899163000,0.00000000],[1771899481000,0.00000000],[1771899801000,0.00000000],[1771900057000,0.00000000],[1771900377000,0.00000000],[1771900698000,0.00000000],[1771900954000,0.00000000],[1771901274000,0.00000000],[1771901594000,0.00000000],[1771901851000,0.00000000],[1771902170000,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: [[1771887641000,0.00000000],[1771887769000,0.00000000],[1771888089000,0.00000000],[1771888409000,0.00000000],[1771888665000,0.00000000],[1771888985000,0.00000000],[1771889252000,0.00000000],[1771889561000,0.00000000],[1771889881000,0.00000000],[1771890202000,0.00000000],[1771890458000,0.00000000],[1771890777000,0.00000000],[1771891097000,0.00000000],[1771891353000,0.00000000],[1771891690000,0.00000000],[1771892009000,0.00000000],[1771892265000,0.20300000],[1771892585000,0.20300000],[1771892913000,0.20300000],[1771893176000,0.20300000],[1771893498000,0.43175000],[1771893755000,0.50800000],[1771894090000,0.50800000],[1771894410000,0.50800000],[1771894665000,0.50800000],[1771895000000,0.50800000],[1771895253000,0.50800000],[1771895576000,0.50800000],[1771895896000,0.50800000],[1771896152000,0.50800000],[1771896472000,0.50800000],[1771896792000,0.50800000],[1771897112000,0.50800000],[1771897368000,0.50800000],[1771897691000,0.50800000],[1771898012000,0.50800000],[1771898265000,0.50800000],[1771898585000,0.50800000],[1771898907000,0.50800000],[1771899163000,0.50800000],[1771899481000,0.50800000],[1771899801000,0.50800000],[1771900057000,0.50800000],[1771900377000,0.50800000],[1771900698000,0.50800000],[1771900954000,0.50800000],[1771901274000,0.50800000],[1771901594000,0.50800000],[1771901851000,0.50800000],[1771902170000,0.50800000],], 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; }