var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1771887627000,4.45000000],[1771887752000,4.50000000],[1771888075000,4.60000000],[1771888395000,4.57500000],[1771888651000,4.68000000],[1771888971000,4.84000000],[1771889291000,4.92000000],[1771889611000,5.05000000],[1771889867000,5.10000000],[1771890187000,5.12000000],[1771890507000,5.10000000],[1771890763000,5.10000000],[1771891083000,5.12000000],[1771891403000,5.27500000],[1771891658000,5.32000000],[1771891979000,5.54000000],[1771892300000,5.67500000],[1771892553000,5.76000000],[1771892875000,5.64000000],[1771893195000,5.45000000],[1771893451000,5.26000000],[1771893771000,5.02000000],[1771894091000,5.00000000],[1771894411000,4.92500000],[1771894667000,4.78000000],[1771894986000,4.70000000],[1771895307000,4.77500000],[1771895563000,4.76000000],[1771895882000,4.78000000],[1771896203000,4.50000000],[1771896459000,4.20000000],[1771896794000,4.25000000],[1771897050000,4.30000000],[1771897370000,4.30000000],[1771897690000,4.44000000],[1771898010000,4.50000000],[1771898266000,4.52000000],[1771898586000,4.80000000],[1771898906000,4.95000000],[1771899161000,4.78000000],[1771899482000,4.66000000],[1771899801000,4.90000000],[1771900057000,4.80000000],[1771900378000,4.66000000],[1771900697000,4.40000000],[1771900952000,4.32000000],[1771901274000,4.40000000],[1771901594000,4.37500000],[1771901850000,4.24000000],[1771902169000,4.22500000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1771887627000,4.3],[1771887752000,4.4],[1771888075000,4.5],[1771888395000,4.4],[1771888651000,4.5],[1771888971000,4.7],[1771889291000,4.8],[1771889611000,4.9],[1771889867000,5],[1771890187000,5],[1771890507000,5],[1771890763000,5],[1771891083000,5],[1771891403000,5.1],[1771891658000,5.2],[1771891979000,5.2],[1771892300000,5],[1771892553000,4.9],[1771892875000,4.9],[1771893195000,4.7],[1771893451000,4.5],[1771893771000,4.3],[1771894091000,4.3],[1771894411000,4.2],[1771894667000,4.2],[1771894986000,4.1],[1771895307000,4.1],[1771895563000,4],[1771895882000,3.9],[1771896203000,3.7],[1771896459000,3.6],[1771896794000,3.7],[1771897050000,3.9],[1771897370000,3.8],[1771897690000,3.8],[1771898010000,3.8],[1771898266000,3.7],[1771898586000,3.7],[1771898906000,3.6],[1771899161000,3.6],[1771899482000,3.5],[1771899801000,3.6],[1771900057000,3.6],[1771900378000,3.5],[1771900697000,3.4],[1771900952000,3.4],[1771901274000,3.6],[1771901594000,3.5],[1771901850000,3.4],[1771902169000,3.3],], 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: [[1771887627000,99.00000000],[1771887752000,99.00000000],[1771888075000,99.00000000],[1771888395000,99.00000000],[1771888651000,99.00000000],[1771888971000,99.00000000],[1771889291000,99.00000000],[1771889611000,99.00000000],[1771889867000,99.00000000],[1771890187000,99.00000000],[1771890507000,99.00000000],[1771890763000,99.00000000],[1771891083000,99.00000000],[1771891403000,99.00000000],[1771891658000,99.00000000],[1771891979000,97.40000000],[1771892300000,95.50000000],[1771892553000,94.20000000],[1771892875000,95.00000000],[1771893195000,95.00000000],[1771893451000,95.20000000],[1771893771000,95.40000000],[1771894091000,95.00000000],[1771894411000,95.00000000],[1771894667000,96.00000000],[1771894986000,96.00000000],[1771895307000,95.50000000],[1771895563000,94.80000000],[1771895882000,94.00000000],[1771896203000,94.50000000],[1771896459000,95.80000000],[1771896794000,96.25000000],[1771897050000,97.00000000],[1771897370000,96.40000000],[1771897690000,96.00000000],[1771898010000,95.25000000],[1771898266000,94.80000000],[1771898586000,92.60000000],[1771898906000,91.00000000],[1771899161000,92.00000000],[1771899482000,92.60000000],[1771899801000,91.50000000],[1771900057000,92.00000000],[1771900378000,92.00000000],[1771900697000,93.25000000],[1771900952000,94.00000000],[1771901274000,94.80000000],[1771901594000,94.00000000],[1771901850000,94.20000000],[1771902169000,94.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: [[1771887627000,1017.2],[1771887752000,1017.2],[1771888075000,1017.1],[1771888395000,1017.1],[1771888651000,1017],[1771888971000,1017.1],[1771889291000,1017],[1771889611000,1017],[1771889867000,1016.9],[1771890187000,1017],[1771890507000,1017.1],[1771890763000,1016.9],[1771891083000,1017],[1771891403000,1017.1],[1771891658000,1017.1],[1771891979000,1017],[1771892300000,1016.7],[1771892553000,1016.6],[1771892875000,1016.6],[1771893195000,1016.5],[1771893451000,1016.4],[1771893771000,1016.4],[1771894091000,1016.4],[1771894411000,1016.2],[1771894667000,1016.2],[1771894986000,1016.2],[1771895307000,1016.1],[1771895563000,1016.1],[1771895882000,1016.1],[1771896203000,1016.3],[1771896459000,1016.4],[1771896794000,1016.3],[1771897050000,1016.2],[1771897370000,1016.1],[1771897690000,1016.1],[1771898010000,1016],[1771898266000,1016.1],[1771898586000,1015.8],[1771898906000,1015.9],[1771899161000,1015.8],[1771899482000,1015.9],[1771899801000,1015.8],[1771900057000,1015.7],[1771900378000,1015.6],[1771900697000,1015.8],[1771900952000,1016],[1771901274000,1015.9],[1771901594000,1016],[1771901850000,1015.8],[1771902169000,1015.8],], 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: [[1771887627000,1.08],[1771887752000,0.288],[1771888075000,0],[1771888395000,0],[1771888651000,2.304],[1771888971000,1.944],[1771889291000,1.872],[1771889611000,4.68],[1771889867000,3.096],[1771890187000,0.432],[1771890507000,1.08],[1771890763000,2.088],[1771891083000,3.24],[1771891403000,3.24],[1771891658000,6.696],[1771891979000,6.192],[1771892300000,3.15],[1771892553000,3.312],[1771892875000,2.88],[1771893195000,2.07],[1771893451000,1.224],[1771893771000,2.232],[1771894091000,1.656],[1771894411000,0.81],[1771894667000,2.088],[1771894986000,2.304],[1771895307000,1.35],[1771895563000,2.736],[1771895882000,2.088],[1771896203000,1.17],[1771896459000,1.584],[1771896794000,0.45],[1771897050000,1.008],[1771897370000,0.36],[1771897690000,0.792],[1771898010000,0.09],[1771898266000,1.512],[1771898586000,2.664],[1771898906000,1.35],[1771899161000,0],[1771899482000,3.168],[1771899801000,1.71],[1771900057000,3.024],[1771900378000,0.36],[1771900697000,0.81],[1771900952000,0.648],[1771901274000,2.016],[1771901594000,0.81],[1771901850000,1.584],[1771902169000,1.98],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1771887627000,1.26],[1771887752000,1.512],[1771888075000,0],[1771888395000,0],[1771888651000,4.032],[1771888971000,2.52],[1771889291000,3.528],[1771889611000,5.76],[1771889867000,3.528],[1771890187000,1.008],[1771890507000,1.89],[1771890763000,4.032],[1771891083000,4.104],[1771891403000,4.41],[1771891658000,9.144],[1771891979000,8.064],[1771892300000,5.04],[1771892553000,4.536],[1771892875000,4.032],[1771893195000,3.15],[1771893451000,2.52],[1771893771000,4.032],[1771894091000,3.024],[1771894411000,1.89],[1771894667000,2.52],[1771894986000,3.528],[1771895307000,1.89],[1771895563000,4.032],[1771895882000,3.528],[1771896203000,1.26],[1771896459000,2.016],[1771896794000,1.26],[1771897050000,1.512],[1771897370000,1.008],[1771897690000,1.008],[1771898010000,0.63],[1771898266000,2.016],[1771898586000,4.032],[1771898906000,1.89],[1771899161000,0],[1771899482000,4.032],[1771899801000,2.52],[1771900057000,3.528],[1771900378000,1.008],[1771900697000,1.89],[1771900952000,1.512],[1771901274000,3.024],[1771901594000,1.89],[1771901850000,3.024],[1771902169000,2.52],], 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: [[1771887627000,45.00000000],[1771887752000,45.00000000],[1771888075000,45.00000000],[1771888395000,45.00000000],[1771888651000,102.40000000],[1771888971000,181.80000000],[1771889291000,193.20000000],[1771889611000,309.00000000],[1771889867000,219.20000000],[1771890187000,157.40000000],[1771890507000,125.00000000],[1771890763000,217.20000000],[1771891083000,131.40000000],[1771891403000,189.25000000],[1771891658000,246.80000000],[1771891979000,278.00000000],[1771892300000,252.75000000],[1771892553000,223.20000000],[1771892875000,180.20000000],[1771893195000,204.75000000],[1771893451000,130.80000000],[1771893771000,195.20000000],[1771894091000,171.80000000],[1771894411000,128.50000000],[1771894667000,217.20000000],[1771894986000,248.60000000],[1771895307000,264.75000000],[1771895563000,301.20000000],[1771895882000,224.80000000],[1771896203000,290.00000000],[1771896459000,210.00000000],[1771896794000,26.25000000],[1771897050000,208.20000000],[1771897370000,157.40000000],[1771897690000,157.80000000],[1771898010000,131.00000000],[1771898266000,276.20000000],[1771898586000,189.80000000],[1771898906000,154.75000000],[1771899161000,113.60000000],[1771899482000,138.60000000],[1771899801000,183.75000000],[1771900057000,103.80000000],[1771900378000,204.60000000],[1771900697000,279.50000000],[1771900952000,224.00000000],[1771901274000,174.40000000],[1771901594000,135.75000000],[1771901850000,189.40000000],[1771902169000,214.50000000],], 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: [[1771887627000,0.00000000],[1771887752000,0.00000000],[1771888075000,0.00000000],[1771888395000,0.00000000],[1771888651000,0.00000000],[1771888971000,0.00000000],[1771889291000,0.00000000],[1771889611000,0.00000000],[1771889867000,0.00000000],[1771890187000,0.00000000],[1771890507000,0.00000000],[1771890763000,0.00000000],[1771891083000,0.00000000],[1771891403000,0.00000000],[1771891658000,0.00000000],[1771891979000,0.00000000],[1771892300000,0.00000000],[1771892553000,0.00000000],[1771892875000,0.00000000],[1771893195000,0.00000000],[1771893451000,0.00000000],[1771893771000,0.00000000],[1771894091000,0.00000000],[1771894411000,0.00000000],[1771894667000,0.00000000],[1771894986000,0.00000000],[1771895307000,0.00000000],[1771895563000,0.00000000],[1771895882000,0.00000000],[1771896203000,0.00000000],[1771896459000,0.00000000],[1771896794000,0.00000000],[1771897050000,0.00000000],[1771897370000,0.00000000],[1771897690000,0.00000000],[1771898010000,0.00000000],[1771898266000,0.00000000],[1771898586000,0.00000000],[1771898906000,0.00000000],[1771899161000,0.00000000],[1771899482000,0.00000000],[1771899801000,0.00000000],[1771900057000,0.00000000],[1771900378000,0.00000000],[1771900697000,0.00000000],[1771900952000,0.00000000],[1771901274000,0.00000000],[1771901594000,0.00000000],[1771901850000,0.00000000],[1771902169000,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: [[1771887627000,0.00000000],[1771887752000,0.00000000],[1771888075000,0.00000000],[1771888395000,0.00000000],[1771888651000,0.00000000],[1771888971000,0.00000000],[1771889291000,0.00000000],[1771889611000,0.00000000],[1771889867000,0.00000000],[1771890187000,0.00000000],[1771890507000,0.00000000],[1771890763000,0.00000000],[1771891083000,0.00000000],[1771891403000,0.00000000],[1771891658000,0.00000000],[1771891979000,0.00000000],[1771892300000,0.00000000],[1771892553000,0.00000000],[1771892875000,0.00000000],[1771893195000,0.00000000],[1771893451000,0.00000000],[1771893771000,0.00000000],[1771894091000,0.00000000],[1771894411000,0.00000000],[1771894667000,0.00000000],[1771894986000,0.00000000],[1771895307000,0.00000000],[1771895563000,0.00000000],[1771895882000,0.00000000],[1771896203000,0.00000000],[1771896459000,0.00000000],[1771896794000,0.00000000],[1771897050000,0.00000000],[1771897370000,0.00000000],[1771897690000,0.00000000],[1771898010000,0.00000000],[1771898266000,0.00000000],[1771898586000,0.00000000],[1771898906000,0.00000000],[1771899161000,0.00000000],[1771899482000,0.00000000],[1771899801000,0.00000000],[1771900057000,0.00000000],[1771900378000,0.00000000],[1771900697000,0.00000000],[1771900952000,0.00000000],[1771901274000,0.00000000],[1771901594000,0.00000000],[1771901850000,0.00000000],[1771902169000,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: [[1771887627000,0.00000000],[1771887752000,0.00000000],[1771888075000,0.00000000],[1771888395000,0.00000000],[1771888651000,0.00000000],[1771888971000,0.00000000],[1771889291000,0.00000000],[1771889611000,0.00000000],[1771889867000,0.00000000],[1771890187000,0.00000000],[1771890507000,0.10150000],[1771890763000,0.20300000],[1771891083000,0.50800000],[1771891403000,0.50800000],[1771891658000,0.50800000],[1771891979000,0.71100000],[1771892300000,0.71100000],[1771892553000,0.87900000],[1771892875000,0.99100000],[1771893195000,0.99100000],[1771893451000,0.99100000],[1771893771000,0.99100000],[1771894091000,0.99100000],[1771894411000,0.99100000],[1771894667000,0.99100000],[1771894986000,0.99100000],[1771895307000,0.99100000],[1771895563000,0.99100000],[1771895882000,0.99100000],[1771896203000,0.99100000],[1771896459000,0.99100000],[1771896794000,0.99100000],[1771897050000,0.99100000],[1771897370000,0.99100000],[1771897690000,0.99100000],[1771898010000,0.99100000],[1771898266000,0.99100000],[1771898586000,0.99100000],[1771898906000,0.99100000],[1771899161000,0.99100000],[1771899482000,0.99100000],[1771899801000,0.99100000],[1771900057000,0.99100000],[1771900378000,0.99100000],[1771900697000,0.99100000],[1771900952000,0.99100000],[1771901274000,0.99100000],[1771901594000,0.99100000],[1771901850000,0.99100000],[1771902169000,0.99100000],], 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; }