var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1785103255000,17.95000000],[1785103367000,18.00000000],[1785103671000,17.90000000],[1785103975000,17.65000000],[1785104279000,17.80000000],[1785104567000,17.94000000],[1785104871000,17.86000000],[1785105175000,17.96000000],[1785105479000,17.96000000],[1785105767000,17.84000000],[1785106071000,17.80000000],[1785106375000,17.72000000],[1785106727000,17.62500000],[1785106967000,17.50000000],[1785107270000,17.50000000],[1785107574000,17.46000000],[1785107926000,17.65000000],[1785108166000,17.52000000],[1785108470000,17.60000000],[1785108774000,17.52500000],[1785109078000,17.44000000],[1785109366000,17.15000000],[1785109670000,17.36000000],[1785109974000,17.42000000],[1785110278000,17.20000000],[1785110566000,17.04000000],[1785110870000,17.18000000],[1785111174000,17.02000000],[1785111478000,16.74000000],[1785111766000,16.36000000],[1785112070000,16.30000000],[1785112374000,16.02000000],[1785112678000,15.94000000],[1785112966000,15.60000000],[1785113270000,15.38000000],[1785113574000,15.42000000],[1785113878000,15.98000000],[1785114166000,15.92000000],[1785114470000,15.30000000],[1785114774000,15.50000000],[1785115078000,15.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1785103255000,12.1],[1785103367000,12.4],[1785103671000,12.7],[1785103975000,12.7],[1785104279000,12.3],[1785104567000,12.5],[1785104871000,12.3],[1785105175000,12.5],[1785105479000,12.5],[1785105767000,12.6],[1785106071000,12.4],[1785106375000,12.4],[1785106727000,12.6],[1785106967000,12.4],[1785107270000,12.4],[1785107574000,12.3],[1785107926000,12.6],[1785108166000,12.4],[1785108470000,12.3],[1785108774000,12.4],[1785109078000,12.8],[1785109366000,12.4],[1785109670000,12.4],[1785109974000,12.8],[1785110278000,12.7],[1785110566000,12.3],[1785110870000,12.3],[1785111174000,12.3],[1785111478000,12.3],[1785111766000,12.2],[1785112070000,12.3],[1785112374000,11.8],[1785112678000,12.1],[1785112966000,11.9],[1785113270000,11.9],[1785113574000,11.7],[1785113878000,11.8],[1785114166000,12.1],[1785114470000,11.9],[1785114774000,11.8],[1785115078000,11.7],], 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: [[1785103255000,69.00000000],[1785103367000,69.80000000],[1785103671000,72.00000000],[1785103975000,72.75000000],[1785104279000,70.60000000],[1785104567000,70.80000000],[1785104871000,70.20000000],[1785105175000,70.80000000],[1785105479000,70.60000000],[1785105767000,71.80000000],[1785106071000,71.00000000],[1785106375000,71.00000000],[1785106727000,72.50000000],[1785106967000,72.00000000],[1785107270000,72.40000000],[1785107574000,72.00000000],[1785107926000,72.50000000],[1785108166000,72.00000000],[1785108470000,71.25000000],[1785108774000,72.00000000],[1785109078000,74.40000000],[1785109366000,74.00000000],[1785109670000,72.60000000],[1785109974000,74.40000000],[1785110278000,74.80000000],[1785110566000,73.60000000],[1785110870000,73.40000000],[1785111174000,74.00000000],[1785111478000,75.00000000],[1785111766000,76.60000000],[1785112070000,77.20000000],[1785112374000,76.40000000],[1785112678000,78.20000000],[1785112966000,78.80000000],[1785113270000,79.80000000],[1785113574000,78.60000000],[1785113878000,76.40000000],[1785114166000,78.00000000],[1785114470000,80.20000000],[1785114774000,79.00000000],[1785115078000,79.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: [[1785103255000,1007.6],[1785103367000,1007.5],[1785103671000,1007.6],[1785103975000,1007.5],[1785104279000,1007.4],[1785104567000,1007.6],[1785104871000,1007.5],[1785105175000,1007.4],[1785105479000,1007.5],[1785105767000,1007.5],[1785106071000,1007.5],[1785106375000,1007.4],[1785106727000,1007.4],[1785106967000,1007.4],[1785107270000,1007.4],[1785107574000,1007.4],[1785107926000,1007.2],[1785108166000,1007.2],[1785108470000,1007.3],[1785108774000,1007.3],[1785109078000,1007.2],[1785109366000,1007.3],[1785109670000,1007.2],[1785109974000,1007.2],[1785110278000,1007.3],[1785110566000,1007.2],[1785110870000,1007.3],[1785111174000,1007.3],[1785111478000,1007.4],[1785111766000,1007.2],[1785112070000,1007.3],[1785112374000,1007.2],[1785112678000,1007.4],[1785112966000,1007.3],[1785113270000,1007.2],[1785113574000,1007.3],[1785113878000,1007.2],[1785114166000,1007.1],[1785114470000,1007.1],[1785114774000,1007.1],[1785115078000,1007.1],], 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: [[1785103255000,2.16],[1785103367000,1.368],[1785103671000,0.09],[1785103975000,1.62],[1785104279000,0.576],[1785104567000,1.944],[1785104871000,2.664],[1785105175000,0.288],[1785105479000,0.144],[1785105767000,0.288],[1785106071000,1.44],[1785106375000,1.584],[1785106727000,0.54],[1785106967000,0.99],[1785107270000,0.792],[1785107574000,1.656],[1785107926000,0.36],[1785108166000,1.152],[1785108470000,1.35],[1785108774000,0.99],[1785109078000,0.792],[1785109366000,1.62],[1785109670000,1.728],[1785109974000,1.512],[1785110278000,0.72],[1785110566000,1.296],[1785110870000,1.44],[1785111174000,1.368],[1785111478000,1.728],[1785111766000,0.936],[1785112070000,3.24],[1785112374000,1.296],[1785112678000,1.44],[1785112966000,0.648],[1785113270000,2.232],[1785113574000,3.312],[1785113878000,2.016],[1785114166000,1.44],[1785114470000,1.872],[1785114774000,1.8],[1785115078000,0.18],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1785103255000,2.7],[1785103367000,1.8],[1785103671000,0.45],[1785103975000,1.8],[1785104279000,1.44],[1785104567000,2.52],[1785104871000,2.88],[1785105175000,0.36],[1785105479000,0.36],[1785105767000,0.72],[1785106071000,2.16],[1785106375000,2.16],[1785106727000,1.35],[1785106967000,1.8],[1785107270000,1.08],[1785107574000,1.8],[1785107926000,0.9],[1785108166000,1.44],[1785108470000,1.8],[1785108774000,1.8],[1785109078000,1.08],[1785109366000,1.8],[1785109670000,2.16],[1785109974000,1.8],[1785110278000,0.72],[1785110566000,1.8],[1785110870000,1.8],[1785111174000,2.16],[1785111478000,2.16],[1785111766000,1.44],[1785112070000,3.24],[1785112374000,1.44],[1785112678000,1.8],[1785112966000,0.72],[1785113270000,2.88],[1785113574000,3.6],[1785113878000,2.52],[1785114166000,2.16],[1785114470000,2.16],[1785114774000,2.52],[1785115078000,0.9],], 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: [[1785103255000,174.50000000],[1785103367000,341.60000000],[1785103671000,333.00000000],[1785103975000,265.75000000],[1785104279000,341.00000000],[1785104567000,148.00000000],[1785104871000,140.60000000],[1785105175000,338.00000000],[1785105479000,339.20000000],[1785105767000,342.80000000],[1785106071000,211.00000000],[1785106375000,275.20000000],[1785106727000,345.75000000],[1785106967000,344.00000000],[1785107270000,348.40000000],[1785107574000,341.00000000],[1785107926000,340.50000000],[1785108166000,350.40000000],[1785108470000,175.75000000],[1785108774000,337.50000000],[1785109078000,343.60000000],[1785109366000,263.25000000],[1785109670000,215.00000000],[1785109974000,339.00000000],[1785110278000,345.60000000],[1785110566000,353.40000000],[1785110870000,340.60000000],[1785111174000,208.80000000],[1785111478000,139.00000000],[1785111766000,340.00000000],[1785112070000,90.00000000],[1785112374000,274.80000000],[1785112678000,213.40000000],[1785112966000,275.40000000],[1785113270000,219.60000000],[1785113574000,82.80000000],[1785113878000,276.80000000],[1785114166000,215.80000000],[1785114470000,212.80000000],[1785114774000,145.40000000],[1785115078000,341.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: [[1785103255000,0.00000000],[1785103367000,0.00000000],[1785103671000,0.00000000],[1785103975000,0.00000000],[1785104279000,0.00000000],[1785104567000,0.00000000],[1785104871000,0.00000000],[1785105175000,0.00000000],[1785105479000,0.00000000],[1785105767000,0.00000000],[1785106071000,0.00000000],[1785106375000,0.00000000],[1785106727000,0.00000000],[1785106967000,0.00000000],[1785107270000,0.00000000],[1785107574000,0.00000000],[1785107926000,0.00000000],[1785108166000,0.00000000],[1785108470000,0.00000000],[1785108774000,0.00000000],[1785109078000,0.00000000],[1785109366000,0.00000000],[1785109670000,0.00000000],[1785109974000,0.00000000],[1785110278000,0.00000000],[1785110566000,0.00000000],[1785110870000,0.00000000],[1785111174000,0.00000000],[1785111478000,0.00000000],[1785111766000,0.00000000],[1785112070000,0.00000000],[1785112374000,0.00000000],[1785112678000,0.00000000],[1785112966000,0.00000000],[1785113270000,0.00000000],[1785113574000,0.00000000],[1785113878000,0.00000000],[1785114166000,0.00000000],[1785114470000,0.00000000],[1785114774000,0.00000000],[1785115078000,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: [[1785103255000,0.00000000],[1785103367000,0.00000000],[1785103671000,0.00000000],[1785103975000,0.00000000],[1785104279000,0.00000000],[1785104567000,0.00000000],[1785104871000,0.00000000],[1785105175000,0.00000000],[1785105479000,0.00000000],[1785105767000,0.00000000],[1785106071000,0.00000000],[1785106375000,0.00000000],[1785106727000,0.00000000],[1785106967000,0.00000000],[1785107270000,0.00000000],[1785107574000,0.00000000],[1785107926000,0.00000000],[1785108166000,0.00000000],[1785108470000,0.00000000],[1785108774000,0.00000000],[1785109078000,0.00000000],[1785109366000,0.00000000],[1785109670000,0.00000000],[1785109974000,0.00000000],[1785110278000,0.00000000],[1785110566000,0.00000000],[1785110870000,0.00000000],[1785111174000,0.00000000],[1785111478000,0.00000000],[1785111766000,0.00000000],[1785112070000,0.00000000],[1785112374000,0.00000000],[1785112678000,0.00000000],[1785112966000,0.00000000],[1785113270000,0.00000000],[1785113574000,0.00000000],[1785113878000,0.00000000],[1785114166000,0.00000000],[1785114470000,0.00000000],[1785114774000,0.00000000],[1785115078000,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: [[1785103255000,0.00000000],[1785103367000,0.00000000],[1785103671000,0.00000000],[1785103975000,0.00000000],[1785104279000,0.00000000],[1785104567000,0.00000000],[1785104871000,0.00000000],[1785105175000,0.00000000],[1785105479000,0.00000000],[1785105767000,0.00000000],[1785106071000,0.00000000],[1785106375000,0.00000000],[1785106727000,0.00000000],[1785106967000,0.00000000],[1785107270000,0.00000000],[1785107574000,0.00000000],[1785107926000,0.00000000],[1785108166000,0.00000000],[1785108470000,0.00000000],[1785108774000,0.00000000],[1785109078000,0.00000000],[1785109366000,0.00000000],[1785109670000,0.00000000],[1785109974000,0.00000000],[1785110278000,0.00000000],[1785110566000,0.00000000],[1785110870000,0.00000000],[1785111174000,0.00000000],[1785111478000,0.00000000],[1785111766000,0.00000000],[1785112070000,0.00000000],[1785112374000,0.00000000],[1785112678000,0.00000000],[1785112966000,0.00000000],[1785113270000,0.00000000],[1785113574000,0.00000000],[1785113878000,0.00000000],[1785114166000,0.00000000],[1785114470000,0.00000000],[1785114774000,0.00000000],[1785115078000,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; }