var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1775253608000,3.03333333],[1775253800000,3.15000000],[1775254052000,3.24000000],[1775254376000,3.54000000],[1775254696000,3.72500000],[1775254952000,3.74000000],[1775255272000,3.84000000],[1775255593000,3.57500000],[1775255854000,3.26000000],[1775256184000,2.92000000],[1775256504000,2.77500000],[1775256752000,2.64000000],[1775257080000,2.36000000],[1775257400000,2.27500000],[1775257656000,2.26000000],[1775257977000,2.04000000],[1775258297000,1.92500000],[1775258553000,1.76000000],[1775258872000,1.60000000],[1775259193000,1.30000000],[1775259513000,1.37500000],[1775259769000,1.28000000],[1775260090000,1.06000000],[1775260409000,1.02500000],[1775260665000,0.86000000],[1775260985000,0.66000000],[1775261305000,0.60000000],[1775261561000,0.68000000],[1775261881000,0.54000000],[1775262202000,0.40000000],[1775262458000,0.50000000],[1775262776000,0.50000000],[1775263096000,0.45000000],[1775263352000,0.26000000],[1775263672000,0.02000000],[1775263992000,0.00000000],[1775264312000,0.00000000],[1775264568000,-0.12000000],[1775264888000,-0.16000000],[1775265208000,-0.10000000],[1775265464000,-0.12000000],[1775265784000,-0.10000000],[1775266104000,-0.20000000],[1775266360000,-0.20000000],[1775266680000,-0.24000000],[1775267000000,-0.30000000],[1775267256000,-0.38000000],[1775267576000,-0.54000000],[1775267896000,-0.47500000],[1775268152000,-0.38000000],[1775268472000,-0.56000000],[1775268792000,-0.68000000],[1775269112000,-0.75000000],[1775269358000,-0.52000000],[1775269688000,-0.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1775253608000,0.4],[1775253800000,0.4],[1775254052000,0.4],[1775254376000,0.5],[1775254696000,0.6],[1775254952000,0.6],[1775255272000,0.6],[1775255593000,0.4],[1775255854000,0.3],[1775256184000,0.1],[1775256504000,0.1],[1775256752000,0.1],[1775257080000,-0.1],[1775257400000,-0],[1775257656000,-0],[1775257977000,-0.2],[1775258297000,-0.2],[1775258553000,-0.2],[1775258872000,-0.4],[1775259193000,-0.6],[1775259513000,-0.4],[1775259769000,-0.5],[1775260090000,-0.6],[1775260409000,-0.6],[1775260665000,-0.8],[1775260985000,-0.9],[1775261305000,-0.9],[1775261561000,-0.8],[1775261881000,-0.8],[1775262202000,-0.9],[1775262458000,-0.8],[1775262776000,-0.8],[1775263096000,-0.9],[1775263352000,-1],[1775263672000,-1.1],[1775263992000,-1.2],[1775264312000,-1.2],[1775264568000,-1.3],[1775264888000,-1.2],[1775265208000,-1.1],[1775265464000,-1.1],[1775265784000,-1.1],[1775266104000,-1.2],[1775266360000,-1.2],[1775266680000,-1.1],[1775267000000,-1.2],[1775267256000,-1.2],[1775267576000,-1.4],[1775267896000,-1.3],[1775268152000,-1.2],[1775268472000,-1.4],[1775268792000,-1.5],[1775269112000,-1.6],[1775269358000,-1.3],[1775269688000,-1.2],], 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: [[1775253608000,83.00000000],[1775253800000,82.50000000],[1775254052000,82.00000000],[1775254376000,80.80000000],[1775254696000,80.00000000],[1775254952000,80.00000000],[1775255272000,79.60000000],[1775255593000,80.25000000],[1775255854000,81.00000000],[1775256184000,82.20000000],[1775256504000,83.00000000],[1775256752000,83.80000000],[1775257080000,84.20000000],[1775257400000,85.00000000],[1775257656000,85.00000000],[1775257977000,85.60000000],[1775258297000,86.00000000],[1775258553000,86.80000000],[1775258872000,87.00000000],[1775259193000,87.20000000],[1775259513000,88.00000000],[1775259769000,88.00000000],[1775260090000,88.60000000],[1775260409000,89.00000000],[1775260665000,89.00000000],[1775260985000,89.20000000],[1775261305000,90.00000000],[1775261561000,90.00000000],[1775261881000,90.80000000],[1775262202000,91.00000000],[1775262458000,91.00000000],[1775262776000,91.00000000],[1775263096000,91.00000000],[1775263352000,91.60000000],[1775263672000,92.00000000],[1775263992000,92.00000000],[1775264312000,92.00000000],[1775264568000,92.20000000],[1775264888000,92.80000000],[1775265208000,93.00000000],[1775265464000,93.00000000],[1775265784000,93.00000000],[1775266104000,93.00000000],[1775266360000,93.20000000],[1775266680000,93.80000000],[1775267000000,94.00000000],[1775267256000,94.00000000],[1775267576000,94.00000000],[1775267896000,94.00000000],[1775268152000,94.00000000],[1775268472000,94.00000000],[1775268792000,94.00000000],[1775269112000,94.00000000],[1775269358000,94.40000000],[1775269688000,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: [[1775253608000,1019.4],[1775253800000,1019.4],[1775254052000,1019.5],[1775254376000,1019.5],[1775254696000,1019.6],[1775254952000,1019.7],[1775255272000,1019.6],[1775255593000,1019.7],[1775255854000,1019.8],[1775256184000,1019.9],[1775256504000,1020],[1775256752000,1020],[1775257080000,1020.1],[1775257400000,1020.1],[1775257656000,1020.2],[1775257977000,1020.2],[1775258297000,1020.2],[1775258553000,1020.3],[1775258872000,1020.3],[1775259193000,1020.3],[1775259513000,1020.3],[1775259769000,1020.3],[1775260090000,1020.4],[1775260409000,1020.5],[1775260665000,1020.5],[1775260985000,1020.5],[1775261305000,1020.5],[1775261561000,1020.4],[1775261881000,1020.5],[1775262202000,1020.6],[1775262458000,1020.5],[1775262776000,1020.5],[1775263096000,1020.4],[1775263352000,1020.5],[1775263672000,1020.6],[1775263992000,1020.6],[1775264312000,1020.5],[1775264568000,1020.5],[1775264888000,1020.6],[1775265208000,1020.7],[1775265464000,1020.6],[1775265784000,1020.6],[1775266104000,1020.5],[1775266360000,1020.5],[1775266680000,1020.5],[1775267000000,1020.6],[1775267256000,1020.7],[1775267576000,1020.7],[1775267896000,1020.6],[1775268152000,1020.7],[1775268472000,1020.7],[1775268792000,1020.8],[1775269112000,1020.8],[1775269358000,1020.8],[1775269688000,1020.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: [[1775253608000,0.119999988],[1775253800000,0.54],[1775254052000,0.504],[1775254376000,0.072],[1775254696000,0],[1775254952000,0.432],[1775255272000,0],[1775255593000,0],[1775255854000,0],[1775256184000,0],[1775256504000,0],[1775256752000,0],[1775257080000,0],[1775257400000,0],[1775257656000,0],[1775257977000,0],[1775258297000,0],[1775258553000,0],[1775258872000,0],[1775259193000,0],[1775259513000,0],[1775259769000,0],[1775260090000,0],[1775260409000,0],[1775260665000,0],[1775260985000,0],[1775261305000,0],[1775261561000,0],[1775261881000,0],[1775262202000,0],[1775262458000,0],[1775262776000,0],[1775263096000,0],[1775263352000,0],[1775263672000,0],[1775263992000,0],[1775264312000,0],[1775264568000,0],[1775264888000,0],[1775265208000,0],[1775265464000,0],[1775265784000,0],[1775266104000,0],[1775266360000,0],[1775266680000,0],[1775267000000,0],[1775267256000,0],[1775267576000,0],[1775267896000,0],[1775268152000,0],[1775268472000,0],[1775268792000,0],[1775269112000,0],[1775269358000,0],[1775269688000,0],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1775253608000,0.839999988],[1775253800000,0.63],[1775254052000,1.008],[1775254376000,0.504],[1775254696000,0],[1775254952000,0.504],[1775255272000,0],[1775255593000,0],[1775255854000,0],[1775256184000,0],[1775256504000,0],[1775256752000,0],[1775257080000,0],[1775257400000,0],[1775257656000,0],[1775257977000,0],[1775258297000,0],[1775258553000,0],[1775258872000,0],[1775259193000,0],[1775259513000,0],[1775259769000,0],[1775260090000,0],[1775260409000,0],[1775260665000,0],[1775260985000,0],[1775261305000,0],[1775261561000,0],[1775261881000,0],[1775262202000,0],[1775262458000,0],[1775262776000,0],[1775263096000,0],[1775263352000,0],[1775263672000,0],[1775263992000,0],[1775264312000,0],[1775264568000,0],[1775264888000,0],[1775265208000,0],[1775265464000,0],[1775265784000,0],[1775266104000,0],[1775266360000,0],[1775266680000,0],[1775267000000,0],[1775267256000,0],[1775267576000,0],[1775267896000,0],[1775268152000,0],[1775268472000,0],[1775268792000,0],[1775269112000,0],[1775269358000,0],[1775269688000,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: [[1775253608000,242.33333333],[1775253800000,93.25000000],[1775254052000,154.40000000],[1775254376000,200.80000000],[1775254696000,339.00000000],[1775254952000,346.00000000],[1775255272000,141.00000000],[1775255593000,355.25000000],[1775255854000,356.00000000],[1775256184000,284.40000000],[1775256504000,354.25000000],[1775256752000,8.80000000],[1775257080000,214.60000000],[1775257400000,348.50000000],[1775257656000,357.80000000],[1775257977000,356.80000000],[1775258297000,356.50000000],[1775258553000,357.00000000],[1775258872000,357.00000000],[1775259193000,357.00000000],[1775259513000,2.25000000],[1775259769000,285.00000000],[1775260090000,356.00000000],[1775260409000,357.50000000],[1775260665000,72.40000000],[1775260985000,356.40000000],[1775261305000,357.00000000],[1775261561000,358.00000000],[1775261881000,357.80000000],[1775262202000,357.50000000],[1775262458000,358.00000000],[1775262776000,358.00000000],[1775263096000,357.75000000],[1775263352000,357.00000000],[1775263672000,356.60000000],[1775263992000,356.20000000],[1775264312000,356.75000000],[1775264568000,357.00000000],[1775264888000,357.00000000],[1775265208000,357.00000000],[1775265464000,357.00000000],[1775265784000,357.60000000],[1775266104000,357.75000000],[1775266360000,357.00000000],[1775266680000,356.60000000],[1775267000000,357.25000000],[1775267256000,357.40000000],[1775267576000,356.40000000],[1775267896000,357.00000000],[1775268152000,357.00000000],[1775268472000,356.60000000],[1775268792000,144.60000000],[1775269112000,357.00000000],[1775269358000,350.00000000],[1775269688000,350.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: [[1775253608000,0.00000000],[1775253800000,0.00000000],[1775254052000,0.00000000],[1775254376000,0.00000000],[1775254696000,0.00000000],[1775254952000,0.00000000],[1775255272000,0.00000000],[1775255593000,0.00000000],[1775255854000,0.00000000],[1775256184000,0.00000000],[1775256504000,0.00000000],[1775256752000,0.00000000],[1775257080000,0.00000000],[1775257400000,0.00000000],[1775257656000,0.00000000],[1775257977000,0.00000000],[1775258297000,0.00000000],[1775258553000,0.00000000],[1775258872000,0.00000000],[1775259193000,0.00000000],[1775259513000,0.00000000],[1775259769000,0.00000000],[1775260090000,0.00000000],[1775260409000,0.00000000],[1775260665000,0.00000000],[1775260985000,0.00000000],[1775261305000,0.00000000],[1775261561000,0.00000000],[1775261881000,0.00000000],[1775262202000,0.00000000],[1775262458000,0.00000000],[1775262776000,0.00000000],[1775263096000,0.00000000],[1775263352000,0.00000000],[1775263672000,0.00000000],[1775263992000,0.00000000],[1775264312000,0.00000000],[1775264568000,0.00000000],[1775264888000,0.00000000],[1775265208000,0.00000000],[1775265464000,0.00000000],[1775265784000,0.00000000],[1775266104000,0.00000000],[1775266360000,0.00000000],[1775266680000,0.00000000],[1775267000000,0.00000000],[1775267256000,0.00000000],[1775267576000,0.00000000],[1775267896000,0.00000000],[1775268152000,0.00000000],[1775268472000,0.00000000],[1775268792000,0.00000000],[1775269112000,0.00000000],[1775269358000,0.00000000],[1775269688000,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: [[1775253608000,0.00000000],[1775253800000,0.00000000],[1775254052000,0.00000000],[1775254376000,0.00000000],[1775254696000,0.00000000],[1775254952000,0.00000000],[1775255272000,0.00000000],[1775255593000,0.00000000],[1775255854000,0.00000000],[1775256184000,0.00000000],[1775256504000,0.00000000],[1775256752000,0.00000000],[1775257080000,0.00000000],[1775257400000,0.00000000],[1775257656000,0.00000000],[1775257977000,0.00000000],[1775258297000,0.00000000],[1775258553000,0.00000000],[1775258872000,0.00000000],[1775259193000,0.00000000],[1775259513000,0.00000000],[1775259769000,0.00000000],[1775260090000,0.00000000],[1775260409000,0.00000000],[1775260665000,0.00000000],[1775260985000,0.00000000],[1775261305000,0.00000000],[1775261561000,0.00000000],[1775261881000,0.00000000],[1775262202000,0.00000000],[1775262458000,0.00000000],[1775262776000,0.00000000],[1775263096000,0.00000000],[1775263352000,0.00000000],[1775263672000,0.00000000],[1775263992000,0.00000000],[1775264312000,0.00000000],[1775264568000,0.00000000],[1775264888000,0.00000000],[1775265208000,0.00000000],[1775265464000,0.00000000],[1775265784000,0.00000000],[1775266104000,0.00000000],[1775266360000,0.00000000],[1775266680000,0.00000000],[1775267000000,0.00000000],[1775267256000,0.00000000],[1775267576000,0.00000000],[1775267896000,0.00000000],[1775268152000,0.00000000],[1775268472000,0.00000000],[1775268792000,0.00000000],[1775269112000,0.00000000],[1775269358000,0.00000000],[1775269688000,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: [[1775253608000,0.00000000],[1775253800000,0.00000000],[1775254052000,0.00000000],[1775254376000,0.00000000],[1775254696000,0.00000000],[1775254952000,0.00000000],[1775255272000,0.00000000],[1775255593000,0.00000000],[1775255854000,0.00000000],[1775256184000,0.00000000],[1775256504000,0.00000000],[1775256752000,0.00000000],[1775257080000,0.00000000],[1775257400000,0.00000000],[1775257656000,0.00000000],[1775257977000,0.00000000],[1775258297000,0.00000000],[1775258553000,0.00000000],[1775258872000,0.00000000],[1775259193000,0.00000000],[1775259513000,0.00000000],[1775259769000,0.00000000],[1775260090000,0.00000000],[1775260409000,0.00000000],[1775260665000,0.00000000],[1775260985000,0.00000000],[1775261305000,0.00000000],[1775261561000,0.00000000],[1775261881000,0.00000000],[1775262202000,0.00000000],[1775262458000,0.00000000],[1775262776000,0.00000000],[1775263096000,0.00000000],[1775263352000,0.00000000],[1775263672000,0.00000000],[1775263992000,0.00000000],[1775264312000,0.00000000],[1775264568000,0.00000000],[1775264888000,0.00000000],[1775265208000,0.00000000],[1775265464000,0.00000000],[1775265784000,0.00000000],[1775266104000,0.00000000],[1775266360000,0.00000000],[1775266680000,0.00000000],[1775267000000,0.00000000],[1775267256000,0.00000000],[1775267576000,0.00000000],[1775267896000,0.00000000],[1775268152000,0.00000000],[1775268472000,0.00000000],[1775268792000,0.00000000],[1775269112000,0.00000000],[1775269358000,0.00000000],[1775269688000,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; }