var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [], 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: 'Rýchlosť vetra (km/h)', data: [[1713477647000,2.52],[1713477775000,0.576],[1713478095000,1.26],[1713478351000,1.44],[1713478671000,2.664],[1713478991000,2.088],[1713479311000,0.18],[1713479567000,2.592],[1713479888000,0.72],[1713480207000,0.72],[1713480463000,0],[1713480783000,0.576],[1713481103000,0.72],[1713481359000,0],[1713481679000,1.008],[1713481999000,0.63],[1713482253000,1.008],[1713482575000,1.656],[1713482895000,1.35],[1713483151000,0],[1713483471000,2.52],[1713483791000,0],[1713484111000,0.54],[1713484367000,0.504],[1713484687000,0.144],[1713485007000,0.54],[1713485263000,0.504],[1713485583000,2.808],[1713485903000,0.99],[1713486152000,0],[1713486463000,1.656],[1713486783000,0.936],[1713487103000,0.63],[1713487352000,0.72],[1713487679000,0.288],[1713487999000,2.16],[1713488252000,0.864],[1713488575000,0.576],[1713488895000,0.63],[1713489151000,0],[1713489471000,0.432],[1713489791000,0.432],[1713490111000,0],[1713490367000,0],[1713490687000,0],[1713491007000,0],[1713491263000,0],[1713491583000,0],[1713491903000,0.09],[1713492152000,0.144],[1713492479000,0.36],[1713492799000,0.45],[1713493053000,1.368],[1713493375000,2.016],[1713493695000,3.06],[1713493967000,3.96],[1713494287000,2.952],[1713494607000,3.15],[1713494863000,2.736],[1713495183000,2.16],[1713495503000,3.15],[1713495753000,2.52],[1713496079000,1.152],[1713496399000,0.81],[1713496652000,0.792],[1713496975000,1.08],[1713497295000,0.99],[1713497551000,1.872],[1713497871000,0.504],[1713498191000,1.152],[1713498511000,1.26],[1713498767000,0],[1713499087000,1.152],[1713499407000,3.42],[1713499663000,2.88],[1713499983000,1.512],[1713500303000,1.53],[1713500575000,2.592],[1713500895000,1.89],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1713477647000,3.78],[1713477775000,1.008],[1713478095000,1.89],[1713478351000,2.016],[1713478671000,3.024],[1713478991000,3.024],[1713479311000,1.26],[1713479567000,3.528],[1713479888000,1.512],[1713480207000,1.26],[1713480463000,0],[1713480783000,1.008],[1713481103000,1.26],[1713481359000,0],[1713481679000,2.016],[1713481999000,0.63],[1713482253000,2.016],[1713482575000,2.52],[1713482895000,1.89],[1713483151000,0],[1713483471000,3.024],[1713483791000,0],[1713484111000,0.63],[1713484367000,1.512],[1713484687000,0.504],[1713485007000,0.63],[1713485263000,1.008],[1713485583000,4.032],[1713485903000,1.26],[1713486152000,0],[1713486463000,3.528],[1713486783000,1.008],[1713487103000,0.63],[1713487352000,1.008],[1713487679000,1.008],[1713487999000,3.15],[1713488252000,1.512],[1713488575000,1.008],[1713488895000,0.63],[1713489151000,0],[1713489471000,0.504],[1713489791000,0.504],[1713490111000,0],[1713490367000,0],[1713490687000,0],[1713491007000,0],[1713491263000,0],[1713491583000,0],[1713491903000,0.63],[1713492152000,1.008],[1713492479000,1.008],[1713492799000,1.26],[1713493053000,2.016],[1713493375000,3.528],[1713493695000,3.78],[1713493967000,5.544],[1713494287000,4.032],[1713494607000,5.04],[1713494863000,4.032],[1713495183000,3.528],[1713495503000,4.41],[1713495753000,3.528],[1713496079000,2.016],[1713496399000,1.89],[1713496652000,2.016],[1713496975000,2.016],[1713497295000,1.89],[1713497551000,3.024],[1713497871000,0.504],[1713498191000,2.52],[1713498511000,1.89],[1713498767000,0],[1713499087000,2.016],[1713499407000,5.04],[1713499663000,4.536],[1713499983000,3.528],[1713500303000,3.15],[1713500575000,4.104],[1713500895000,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: [[1713477647000,325.00000000],[1713477775000,308.80000000],[1713478095000,242.00000000],[1713478351000,229.00000000],[1713478671000,310.60000000],[1713478991000,309.00000000],[1713479311000,287.25000000],[1713479567000,296.20000000],[1713479888000,295.60000000],[1713480207000,285.25000000],[1713480463000,299.20000000],[1713480783000,299.00000000],[1713481103000,277.00000000],[1713481359000,298.80000000],[1713481679000,263.00000000],[1713481999000,290.50000000],[1713482253000,313.80000000],[1713482575000,316.80000000],[1713482895000,327.75000000],[1713483151000,313.80000000],[1713483471000,319.40000000],[1713483791000,319.60000000],[1713484111000,309.50000000],[1713484367000,312.20000000],[1713484687000,308.00000000],[1713485007000,298.50000000],[1713485263000,282.00000000],[1713485583000,292.40000000],[1713485903000,293.25000000],[1713486152000,298.80000000],[1713486463000,325.00000000],[1713486783000,321.60000000],[1713487103000,319.25000000],[1713487352000,286.80000000],[1713487679000,299.20000000],[1713487999000,295.25000000],[1713488252000,329.60000000],[1713488575000,324.40000000],[1713488895000,324.75000000],[1713489151000,321.20000000],[1713489471000,321.20000000],[1713489791000,322.00000000],[1713490111000,322.00000000],[1713490367000,322.00000000],[1713490687000,322.00000000],[1713491007000,322.00000000],[1713491263000,322.00000000],[1713491583000,322.00000000],[1713491903000,321.25000000],[1713492152000,321.00000000],[1713492479000,321.00000000],[1713492799000,318.00000000],[1713493053000,299.00000000],[1713493375000,307.20000000],[1713493695000,316.25000000],[1713493967000,314.60000000],[1713494287000,317.80000000],[1713494607000,316.00000000],[1713494863000,300.00000000],[1713495183000,310.00000000],[1713495503000,313.25000000],[1713495753000,305.20000000],[1713496079000,310.20000000],[1713496399000,308.50000000],[1713496652000,302.40000000],[1713496975000,304.20000000],[1713497295000,302.00000000],[1713497551000,304.20000000],[1713497871000,307.60000000],[1713498191000,297.20000000],[1713498511000,292.00000000],[1713498767000,298.60000000],[1713499087000,294.20000000],[1713499407000,312.25000000],[1713499663000,234.80000000],[1713499983000,310.40000000],[1713500303000,300.25000000],[1713500575000,310.20000000],[1713500895000,298.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: [[1713477647000,0.00000000],[1713477775000,0.00000000],[1713478095000,0.00000000],[1713478351000,0.00000000],[1713478671000,0.00000000],[1713478991000,0.00000000],[1713479311000,0.00000000],[1713479567000,0.00000000],[1713479888000,0.00000000],[1713480207000,0.00000000],[1713480463000,0.00000000],[1713480783000,0.00000000],[1713481103000,0.00000000],[1713481359000,0.00000000],[1713481679000,0.00000000],[1713481999000,0.00000000],[1713482253000,0.00000000],[1713482575000,0.00000000],[1713482895000,0.00000000],[1713483151000,0.00000000],[1713483471000,0.00000000],[1713483791000,0.00000000],[1713484111000,0.00000000],[1713484367000,0.00000000],[1713484687000,0.00000000],[1713485007000,0.00000000],[1713485263000,0.00000000],[1713485583000,0.00000000],[1713485903000,0.00000000],[1713486152000,0.00000000],[1713486463000,0.00000000],[1713486783000,0.00000000],[1713487103000,0.00000000],[1713487352000,0.00000000],[1713487679000,0.00000000],[1713487999000,0.00000000],[1713488252000,0.00000000],[1713488575000,0.00000000],[1713488895000,0.00000000],[1713489151000,0.00000000],[1713489471000,0.00000000],[1713489791000,0.00000000],[1713490111000,0.00000000],[1713490367000,0.00000000],[1713490687000,0.00000000],[1713491007000,0.00000000],[1713491263000,0.00000000],[1713491583000,0.00000000],[1713491903000,0.00000000],[1713492152000,0.00000000],[1713492479000,0.00000000],[1713492799000,0.00000000],[1713493053000,0.00000000],[1713493375000,0.00000000],[1713493695000,0.00000000],[1713493967000,0.00000000],[1713494287000,0.00000000],[1713494607000,0.00000000],[1713494863000,0.00000000],[1713495183000,0.00000000],[1713495503000,0.00000000],[1713495753000,0.00000000],[1713496079000,0.00000000],[1713496399000,0.00000000],[1713496652000,0.00000000],[1713496975000,0.00000000],[1713497295000,0.00000000],[1713497551000,0.60000000],[1713497871000,1.00000000],[1713498191000,2.00000000],[1713498511000,3.00000000],[1713498767000,4.40000000],[1713499087000,6.20000000],[1713499407000,8.00000000],[1713499663000,9.60000000],[1713499983000,11.60000000],[1713500303000,13.25000000],[1713500575000,15.00000000],[1713500895000,16.50000000],], 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: [[1713477647000,0.00000000],[1713477775000,0.00000000],[1713478095000,0.00000000],[1713478351000,0.00000000],[1713478671000,0.00000000],[1713478991000,0.00000000],[1713479311000,0.00000000],[1713479567000,0.00000000],[1713479888000,0.00000000],[1713480207000,0.00000000],[1713480463000,0.00000000],[1713480783000,0.00000000],[1713481103000,0.00000000],[1713481359000,0.00000000],[1713481679000,0.00000000],[1713481999000,0.00000000],[1713482253000,0.00000000],[1713482575000,0.00000000],[1713482895000,0.00000000],[1713483151000,0.00000000],[1713483471000,0.00000000],[1713483791000,0.00000000],[1713484111000,0.00000000],[1713484367000,0.00000000],[1713484687000,0.00000000],[1713485007000,0.00000000],[1713485263000,0.00000000],[1713485583000,0.00000000],[1713485903000,0.00000000],[1713486152000,0.00000000],[1713486463000,0.00000000],[1713486783000,0.00000000],[1713487103000,0.00000000],[1713487352000,0.00000000],[1713487679000,0.00000000],[1713487999000,0.00000000],[1713488252000,0.00000000],[1713488575000,0.00000000],[1713488895000,0.00000000],[1713489151000,0.00000000],[1713489471000,0.00000000],[1713489791000,0.00000000],[1713490111000,0.00000000],[1713490367000,0.00000000],[1713490687000,0.00000000],[1713491007000,0.00000000],[1713491263000,0.00000000],[1713491583000,0.00000000],[1713491903000,0.00000000],[1713492152000,0.00000000],[1713492479000,0.00000000],[1713492799000,0.00000000],[1713493053000,0.00000000],[1713493375000,0.00000000],[1713493695000,0.00000000],[1713493967000,0.00000000],[1713494287000,0.00000000],[1713494607000,0.00000000],[1713494863000,0.00000000],[1713495183000,0.00000000],[1713495503000,0.00000000],[1713495753000,0.00000000],[1713496079000,0.00000000],[1713496399000,0.00000000],[1713496652000,0.00000000],[1713496975000,0.00000000],[1713497295000,0.00000000],[1713497551000,0.00000000],[1713497871000,0.00000000],[1713498191000,0.00000000],[1713498511000,0.00000000],[1713498767000,0.00000000],[1713499087000,0.00000000],[1713499407000,0.00000000],[1713499663000,0.00000000],[1713499983000,0.00000000],[1713500303000,0.00000000],[1713500575000,0.00000000],[1713500895000,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: [[1713477647000,0.00000000],[1713477775000,0.00000000],[1713478095000,0.00000000],[1713478351000,0.00000000],[1713478671000,0.00000000],[1713478991000,0.00000000],[1713479311000,0.00000000],[1713479567000,0.00000000],[1713479888000,0.00000000],[1713480207000,0.00000000],[1713480463000,0.00000000],[1713480783000,0.00000000],[1713481103000,0.00000000],[1713481359000,0.00000000],[1713481679000,0.00000000],[1713481999000,0.00000000],[1713482253000,0.00000000],[1713482575000,0.00000000],[1713482895000,0.00000000],[1713483151000,0.00000000],[1713483471000,0.00000000],[1713483791000,0.00000000],[1713484111000,0.00000000],[1713484367000,0.00000000],[1713484687000,0.00000000],[1713485007000,0.00000000],[1713485263000,0.00000000],[1713485583000,0.00000000],[1713485903000,0.00000000],[1713486152000,0.00000000],[1713486463000,0.00000000],[1713486783000,0.00000000],[1713487103000,0.00000000],[1713487352000,0.00000000],[1713487679000,0.00000000],[1713487999000,0.00000000],[1713488252000,0.00000000],[1713488575000,0.00000000],[1713488895000,0.00000000],[1713489151000,0.00000000],[1713489471000,0.00000000],[1713489791000,0.00000000],[1713490111000,0.00000000],[1713490367000,0.00000000],[1713490687000,0.00000000],[1713491007000,0.00000000],[1713491263000,0.00000000],[1713491583000,0.00000000],[1713491903000,0.00000000],[1713492152000,0.00000000],[1713492479000,0.00000000],[1713492799000,0.00000000],[1713493053000,0.00000000],[1713493375000,0.00000000],[1713493695000,0.00000000],[1713493967000,0.00000000],[1713494287000,0.00000000],[1713494607000,0.00000000],[1713494863000,0.00000000],[1713495183000,0.00000000],[1713495503000,0.00000000],[1713495753000,0.00000000],[1713496079000,0.00000000],[1713496399000,0.00000000],[1713496652000,0.00000000],[1713496975000,0.00000000],[1713497295000,0.00000000],[1713497551000,0.00000000],[1713497871000,0.00000000],[1713498191000,0.00000000],[1713498511000,0.00000000],[1713498767000,0.00000000],[1713499087000,0.00000000],[1713499407000,0.00000000],[1713499663000,0.00000000],[1713499983000,0.00000000],[1713500303000,0.00000000],[1713500575000,0.00000000],[1713500895000,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; }