var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1749333645000,19.45000000],[1749333771000,19.34000000],[1749334091000,19.08000000],[1749334412000,18.82500000],[1749334669000,18.64000000],[1749334987000,18.48000000],[1749335307000,18.27500000],[1749335563000,18.12000000],[1749335883000,17.96000000],[1749336205000,17.77500000],[1749336460000,17.62000000],[1749336779000,17.50000000],[1749337100000,17.42500000],[1749337354000,17.32000000],[1749337675000,17.42000000],[1749337998000,17.37500000],[1749338266000,17.28000000],[1749338587000,17.14000000],[1749338906000,17.10000000],[1749339162000,17.02000000],[1749339482000,16.72000000],[1749339802000,16.45000000],[1749340058000,16.26000000],[1749340378000,16.02000000],[1749340699000,15.87500000],[1749340953000,15.77500000],[1749341274000,15.84000000],[1749341594000,15.90000000],[1749368507000,20.30000000],[1749368571000,20.28000000],[1749368908000,20.17500000],[1749369164000,20.00000000],[1749369482000,19.92500000],[1749369753000,19.86000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1749333645000,15.4],[1749333771000,15.4],[1749334091000,15.4],[1749334412000,15.3],[1749334669000,15.1],[1749334987000,15.2],[1749335307000,15.1],[1749335563000,15],[1749335883000,15],[1749336205000,14.9],[1749336460000,14.9],[1749336779000,14.7],[1749337100000,14.8],[1749337354000,14.6],[1749337675000,14.6],[1749337998000,14.7],[1749338266000,14.8],[1749338587000,14.6],[1749338906000,14.5],[1749339162000,14.5],[1749339482000,14.4],[1749339802000,14.4],[1749340058000,14.4],[1749340378000,14.3],[1749340699000,14.3],[1749340953000,14.3],[1749341274000,14.4],[1749341594000,14.4],[1749368507000,15.9],[1749368571000,15.8],[1749368908000,15.9],[1749369164000,15.8],[1749369482000,15.9],[1749369753000,15.9],], 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: [[1749333645000,77.50000000],[1749333771000,78.00000000],[1749334091000,79.40000000],[1749334412000,80.00000000],[1749334669000,80.00000000],[1749334987000,81.20000000],[1749335307000,82.00000000],[1749335563000,82.20000000],[1749335883000,83.00000000],[1749336205000,83.50000000],[1749336460000,84.00000000],[1749336779000,84.00000000],[1749337100000,84.50000000],[1749337354000,84.00000000],[1749337675000,83.60000000],[1749337998000,84.25000000],[1749338266000,85.40000000],[1749338587000,85.00000000],[1749338906000,85.00000000],[1749339162000,85.00000000],[1749339482000,86.40000000],[1749339802000,87.75000000],[1749340058000,89.00000000],[1749340378000,89.80000000],[1749340699000,90.25000000],[1749340953000,91.25000000],[1749341274000,91.00000000],[1749341594000,90.75000000],[1749368507000,76.00000000],[1749368571000,75.60000000],[1749368908000,76.75000000],[1749369164000,77.00000000],[1749369482000,77.50000000],[1749369753000,78.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: [[1749333645000,1014.4],[1749333771000,1014.4],[1749334091000,1014.5],[1749334412000,1014.5],[1749334669000,1014.5],[1749334987000,1014.6],[1749335307000,1014.5],[1749335563000,1014.7],[1749335883000,1014.6],[1749336205000,1014.7],[1749336460000,1014.7],[1749336779000,1014.6],[1749337100000,1014.6],[1749337354000,1014.3],[1749337675000,1014.3],[1749337998000,1014.3],[1749338266000,1014.3],[1749338587000,1014.6],[1749338906000,1014.6],[1749339162000,1014.7],[1749339482000,1014.7],[1749339802000,1014.7],[1749340058000,1014.8],[1749340378000,1014.7],[1749340699000,1014.5],[1749340953000,1014.5],[1749341274000,1014.5],[1749341594000,1014.5],[1749368507000,1014.7],[1749368571000,1014.8],[1749368908000,1014.9],[1749369164000,1015],[1749369482000,1015],[1749369753000,1014.9],], 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: [[1749333645000,0.36],[1749333771000,4.464],[1749334091000,3.672],[1749334412000,1.26],[1749334669000,0.288],[1749334987000,1.008],[1749335307000,2.88],[1749335563000,0.576],[1749335883000,0.576],[1749336205000,0],[1749336460000,0],[1749336779000,0],[1749337100000,0],[1749337354000,0],[1749337675000,0],[1749337998000,0],[1749338266000,1.872],[1749338587000,1.944],[1749338906000,0.72],[1749339162000,0],[1749339482000,0.288],[1749339802000,0],[1749340058000,0],[1749340378000,0],[1749340699000,0],[1749340953000,0],[1749341274000,0.288],[1749341594000,0.54],[1749368507000,0],[1749368571000,0.72],[1749368908000,3.69],[1749369164000,1.872],[1749369482000,1.71],[1749369753000,1.728],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1749333645000,1.26],[1749333771000,6.552],[1749334091000,7.776],[1749334412000,1.89],[1749334669000,0.504],[1749334987000,3.024],[1749335307000,4.41],[1749335563000,1.512],[1749335883000,1.008],[1749336205000,0],[1749336460000,0],[1749336779000,0],[1749337100000,0],[1749337354000,0],[1749337675000,0],[1749337998000,0],[1749338266000,2.52],[1749338587000,3.528],[1749338906000,1.26],[1749339162000,0],[1749339482000,0.504],[1749339802000,0],[1749340058000,0],[1749340378000,0],[1749340699000,0],[1749340953000,0],[1749341274000,0.504],[1749341594000,0.63],[1749368507000,0],[1749368571000,1.512],[1749368908000,4.41],[1749369164000,3.528],[1749369482000,2.52],[1749369753000,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: [[1749333645000,185.00000000],[1749333771000,141.40000000],[1749334091000,170.20000000],[1749334412000,257.50000000],[1749334669000,270.60000000],[1749334987000,330.80000000],[1749335307000,176.50000000],[1749335563000,133.80000000],[1749335883000,146.20000000],[1749336205000,80.25000000],[1749336460000,8.80000000],[1749336779000,78.60000000],[1749337100000,17.50000000],[1749337354000,83.60000000],[1749337675000,141.80000000],[1749337998000,11.00000000],[1749338266000,271.60000000],[1749338587000,182.20000000],[1749338906000,167.75000000],[1749339162000,77.60000000],[1749339482000,203.20000000],[1749339802000,92.00000000],[1749340058000,77.40000000],[1749340378000,74.20000000],[1749340699000,10.00000000],[1749340953000,89.00000000],[1749341274000,324.40000000],[1749341594000,182.25000000],[1749368507000,347.00000000],[1749368571000,280.40000000],[1749368908000,301.25000000],[1749369164000,239.40000000],[1749369482000,249.75000000],[1749369753000,206.20000000],], 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: [[1749333645000,0.00000000],[1749333771000,0.00000000],[1749334091000,0.00000000],[1749334412000,0.00000000],[1749334669000,0.00000000],[1749334987000,0.00000000],[1749335307000,0.00000000],[1749335563000,0.00000000],[1749335883000,0.00000000],[1749336205000,0.00000000],[1749336460000,0.00000000],[1749336779000,0.00000000],[1749337100000,0.00000000],[1749337354000,0.00000000],[1749337675000,0.00000000],[1749337998000,0.00000000],[1749338266000,0.00000000],[1749338587000,0.00000000],[1749338906000,0.00000000],[1749339162000,0.00000000],[1749339482000,0.00000000],[1749339802000,0.00000000],[1749340058000,0.00000000],[1749340378000,0.00000000],[1749340699000,0.00000000],[1749340953000,0.00000000],[1749341274000,0.00000000],[1749341594000,0.00000000],[1749368507000,43.00000000],[1749368571000,50.60000000],[1749368908000,57.50000000],[1749369164000,58.40000000],[1749369482000,64.25000000],[1749369753000,75.40000000],], 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: [[1749333645000,0.00000000],[1749333771000,0.00000000],[1749334091000,0.00000000],[1749334412000,0.00000000],[1749334669000,0.00000000],[1749334987000,0.00000000],[1749335307000,0.00000000],[1749335563000,0.00000000],[1749335883000,0.00000000],[1749336205000,0.00000000],[1749336460000,0.00000000],[1749336779000,0.00000000],[1749337100000,0.00000000],[1749337354000,0.00000000],[1749337675000,0.00000000],[1749337998000,0.00000000],[1749338266000,0.00000000],[1749338587000,0.00000000],[1749338906000,0.00000000],[1749339162000,0.00000000],[1749339482000,0.00000000],[1749339802000,0.00000000],[1749340058000,0.00000000],[1749340378000,0.00000000],[1749340699000,0.00000000],[1749340953000,0.00000000],[1749341274000,0.00000000],[1749341594000,0.00000000],[1749368507000,0.00000000],[1749368571000,0.00000000],[1749368908000,0.00000000],[1749369164000,0.00000000],[1749369482000,0.00000000],[1749369753000,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: [[1749333645000,0.00000000],[1749333771000,0.00000000],[1749334091000,0.00000000],[1749334412000,0.00000000],[1749334669000,0.00000000],[1749334987000,0.00000000],[1749335307000,0.00000000],[1749335563000,0.00000000],[1749335883000,0.00000000],[1749336205000,0.00000000],[1749336460000,0.00000000],[1749336779000,0.00000000],[1749337100000,0.00000000],[1749337354000,0.00000000],[1749337675000,0.00000000],[1749337998000,0.00000000],[1749338266000,0.00000000],[1749338587000,0.00000000],[1749338906000,0.00000000],[1749339162000,0.00000000],[1749339482000,0.00000000],[1749339802000,0.00000000],[1749340058000,0.00000000],[1749340378000,0.00000000],[1749340699000,0.00000000],[1749340953000,0.00000000],[1749341274000,0.00000000],[1749341594000,0.00000000],[1749368507000,0.00000000],[1749368571000,0.00000000],[1749368908000,0.00000000],[1749369164000,0.00000000],[1749369482000,0.00000000],[1749369753000,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; }