var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1778968853000,9.60000000],[1778968981000,9.65000000],[1778969252000,9.62000000],[1778969574000,9.60000000],[1778969894000,9.60000000],[1778970212000,9.62500000],[1778970460000,9.56000000],[1778970773000,9.54000000],[1778971093000,9.56000000],[1778971412000,9.60000000],[1778971666000,9.60000000],[1778971989000,9.60000000],[1778972309000,9.60000000],[1778972560000,9.60000000],[1778972902000,9.60000000],[1778973154000,9.62000000],[1778973493000,9.62000000],[1778973813000,9.80000000],[1778974101000,9.85000000],[1778974353000,9.76000000],[1778974677000,9.82000000],[1778974997000,9.80000000],[1778975253000,9.80000000],[1778975564000,9.74000000],[1778975893000,9.74000000],[1778976212000,9.82500000],[1778976468000,9.94000000],[1778976789000,9.96000000],[1778977109000,10.00000000],[1778977365000,10.06000000],[1778977685000,10.15000000],[1778977954000,10.12000000],[1778978277000,10.04000000],[1778978597000,10.00000000],[1778978853000,10.10000000],[1778979173000,10.06000000],[1778979493000,10.00000000],[1778979813000,10.10000000],[1778980066000,10.14000000],[1778980389000,10.18000000],[1778980709000,10.20000000],[1778980965000,10.22000000],[1778981285000,10.30000000],[1778981602000,10.22500000],[1778981858000,10.20000000],[1778982181000,10.18000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1778968853000,7.7],[1778968981000,7.7],[1778969252000,7.7],[1778969574000,7.7],[1778969894000,7.7],[1778970212000,7.7],[1778970460000,7.8],[1778970773000,7.8],[1778971093000,7.6],[1778971412000,7.8],[1778971666000,7.7],[1778971989000,7.7],[1778972309000,7.6],[1778972560000,7.7],[1778972902000,7.6],[1778973154000,7.6],[1778973493000,7.5],[1778973813000,7.5],[1778974101000,7.5],[1778974353000,7.4],[1778974677000,7.4],[1778974997000,7.4],[1778975253000,7.4],[1778975564000,7.3],[1778975893000,7.3],[1778976212000,7.2],[1778976468000,7.3],[1778976789000,7.2],[1778977109000,7.2],[1778977365000,7.1],[1778977685000,7],[1778977954000,7.2],[1778978277000,7.1],[1778978597000,7],[1778978853000,7.1],[1778979173000,7.2],[1778979493000,7.1],[1778979813000,7.2],[1778980066000,7.1],[1778980389000,7.2],[1778980709000,7.2],[1778980965000,7.1],[1778981285000,7.1],[1778981602000,7.2],[1778981858000,7.2],[1778982181000,7.1],], 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: [[1778968853000,88.00000000],[1778968981000,88.00000000],[1778969252000,88.20000000],[1778969574000,88.20000000],[1778969894000,88.00000000],[1778970212000,88.00000000],[1778970460000,88.80000000],[1778970773000,89.00000000],[1778971093000,88.00000000],[1778971412000,88.50000000],[1778971666000,88.20000000],[1778971989000,88.00000000],[1778972309000,87.75000000],[1778972560000,87.80000000],[1778972902000,87.25000000],[1778973154000,87.40000000],[1778973493000,86.80000000],[1778973813000,85.50000000],[1778974101000,85.75000000],[1778974353000,85.60000000],[1778974677000,85.00000000],[1778974997000,85.00000000],[1778975253000,85.00000000],[1778975564000,85.20000000],[1778975893000,85.20000000],[1778976212000,84.00000000],[1778976468000,84.00000000],[1778976789000,83.20000000],[1778977109000,82.75000000],[1778977365000,82.20000000],[1778977685000,81.25000000],[1778977954000,82.00000000],[1778978277000,82.20000000],[1778978597000,82.00000000],[1778978853000,81.60000000],[1778979173000,82.60000000],[1778979493000,82.60000000],[1778979813000,82.50000000],[1778980066000,81.80000000],[1778980389000,81.80000000],[1778980709000,82.00000000],[1778980965000,81.20000000],[1778981285000,81.00000000],[1778981602000,81.75000000],[1778981858000,81.60000000],[1778982181000,81.60000000],], 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: [[1778968853000,1008.2],[1778968981000,1008.1],[1778969252000,1008.2],[1778969574000,1008.2],[1778969894000,1008.2],[1778970212000,1008.3],[1778970460000,1008.3],[1778970773000,1008.4],[1778971093000,1008.5],[1778971412000,1008.4],[1778971666000,1008.6],[1778971989000,1008.5],[1778972309000,1008.5],[1778972560000,1008.5],[1778972902000,1008.5],[1778973154000,1008.5],[1778973493000,1008.6],[1778973813000,1008.5],[1778974101000,1008.4],[1778974353000,1008.6],[1778974677000,1008.6],[1778974997000,1008.7],[1778975253000,1008.8],[1778975564000,1008.8],[1778975893000,1008.9],[1778976212000,1009],[1778976468000,1008.8],[1778976789000,1008.9],[1778977109000,1009],[1778977365000,1009.1],[1778977685000,1009.1],[1778977954000,1009.2],[1778978277000,1009.2],[1778978597000,1009.2],[1778978853000,1009.3],[1778979173000,1009.3],[1778979493000,1009.4],[1778979813000,1009.2],[1778980066000,1009.3],[1778980389000,1009.4],[1778980709000,1009.4],[1778980965000,1009.4],[1778981285000,1009.3],[1778981602000,1009.3],[1778981858000,1009.3],[1778982181000,1009.4],], 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: [[1778968853000,15.3],[1778968981000,12.78],[1778969252000,9.216],[1778969574000,8.784],[1778969894000,11.232],[1778970212000,9.81],[1778970460000,6.84],[1778970773000,6.552],[1778971093000,10.152],[1778971412000,9.09],[1778971666000,9.936],[1778971989000,9.648],[1778972309000,9.09],[1778972560000,9.792],[1778972902000,11.16],[1778973154000,8.496],[1778973493000,11.88],[1778973813000,16.11],[1778974101000,10.35],[1778974353000,10.512],[1778974677000,10.44],[1778974997000,10.98],[1778975253000,7.488],[1778975564000,6.768],[1778975893000,6.552],[1778976212000,11.79],[1778976468000,8.712],[1778976789000,10.152],[1778977109000,9.63],[1778977365000,10.944],[1778977685000,12.96],[1778977954000,7.272],[1778978277000,7.992],[1778978597000,8.37],[1778978853000,8.28],[1778979173000,6.552],[1778979493000,5.976],[1778979813000,4.5],[1778980066000,7.776],[1778980389000,5.544],[1778980709000,4.77],[1778980965000,8.064],[1778981285000,7.776],[1778981602000,7.47],[1778981858000,8.064],[1778982181000,6.84],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1778968853000,19.26],[1778968981000,21.78],[1778969252000,13.896],[1778969574000,15.336],[1778969894000,17.856],[1778970212000,14.85],[1778970460000,9.648],[1778970773000,11.808],[1778971093000,15.48],[1778971412000,14.13],[1778971666000,19.008],[1778971989000,14.832],[1778972309000,15.39],[1778972560000,14.904],[1778972902000,17.37],[1778973154000,12.24],[1778973493000,15.408],[1778973813000,22.41],[1778974101000,17.28],[1778974353000,16.92],[1778974677000,14.832],[1778974997000,16.02],[1778975253000,11.736],[1778975564000,9.72],[1778975893000,9.792],[1778976212000,19.89],[1778976468000,13.896],[1778976789000,15.84],[1778977109000,12.78],[1778977365000,15.84],[1778977685000,17.28],[1778977954000,10.224],[1778978277000,12.816],[1778978597000,12.87],[1778978853000,13.824],[1778979173000,10.728],[1778979493000,10.656],[1778979813000,7.65],[1778980066000,13.32],[1778980389000,9.72],[1778980709000,8.19],[1778980965000,11.232],[1778981285000,10.656],[1778981602000,10.89],[1778981858000,11.232],[1778982181000,11.232],], 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: [[1778968853000,253.50000000],[1778968981000,235.75000000],[1778969252000,241.20000000],[1778969574000,245.40000000],[1778969894000,141.60000000],[1778970212000,158.25000000],[1778970460000,95.20000000],[1778970773000,105.40000000],[1778971093000,261.80000000],[1778971412000,187.50000000],[1778971666000,226.20000000],[1778971989000,314.60000000],[1778972309000,277.00000000],[1778972560000,272.80000000],[1778972902000,226.50000000],[1778973154000,238.80000000],[1778973493000,217.40000000],[1778973813000,249.00000000],[1778974101000,199.25000000],[1778974353000,249.00000000],[1778974677000,165.00000000],[1778974997000,232.00000000],[1778975253000,256.20000000],[1778975564000,156.80000000],[1778975893000,198.20000000],[1778976212000,265.25000000],[1778976468000,254.80000000],[1778976789000,256.40000000],[1778977109000,138.50000000],[1778977365000,314.60000000],[1778977685000,184.50000000],[1778977954000,121.00000000],[1778978277000,241.60000000],[1778978597000,243.00000000],[1778978853000,201.40000000],[1778979173000,177.20000000],[1778979493000,172.00000000],[1778979813000,257.00000000],[1778980066000,255.20000000],[1778980389000,128.00000000],[1778980709000,261.00000000],[1778980965000,212.40000000],[1778981285000,226.20000000],[1778981602000,241.25000000],[1778981858000,148.60000000],[1778982181000,277.40000000],], 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: [[1778968853000,0.00000000],[1778968981000,0.00000000],[1778969252000,0.00000000],[1778969574000,0.00000000],[1778969894000,0.00000000],[1778970212000,0.00000000],[1778970460000,0.00000000],[1778970773000,0.00000000],[1778971093000,0.00000000],[1778971412000,0.00000000],[1778971666000,0.00000000],[1778971989000,0.00000000],[1778972309000,0.00000000],[1778972560000,0.00000000],[1778972902000,0.00000000],[1778973154000,0.00000000],[1778973493000,0.00000000],[1778973813000,0.00000000],[1778974101000,0.00000000],[1778974353000,0.00000000],[1778974677000,0.00000000],[1778974997000,0.00000000],[1778975253000,0.00000000],[1778975564000,0.00000000],[1778975893000,0.00000000],[1778976212000,0.00000000],[1778976468000,0.00000000],[1778976789000,0.00000000],[1778977109000,0.00000000],[1778977365000,0.00000000],[1778977685000,0.00000000],[1778977954000,0.00000000],[1778978277000,0.00000000],[1778978597000,0.00000000],[1778978853000,0.00000000],[1778979173000,0.00000000],[1778979493000,0.00000000],[1778979813000,0.00000000],[1778980066000,0.00000000],[1778980389000,0.00000000],[1778980709000,0.00000000],[1778980965000,0.00000000],[1778981285000,0.00000000],[1778981602000,0.00000000],[1778981858000,0.00000000],[1778982181000,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: [[1778968853000,0.00000000],[1778968981000,0.00000000],[1778969252000,0.00000000],[1778969574000,0.00000000],[1778969894000,0.00000000],[1778970212000,0.00000000],[1778970460000,0.00000000],[1778970773000,0.00000000],[1778971093000,0.00000000],[1778971412000,0.00000000],[1778971666000,0.00000000],[1778971989000,0.00000000],[1778972309000,0.00000000],[1778972560000,0.00000000],[1778972902000,0.00000000],[1778973154000,0.00000000],[1778973493000,0.00000000],[1778973813000,0.00000000],[1778974101000,0.00000000],[1778974353000,0.00000000],[1778974677000,0.00000000],[1778974997000,0.00000000],[1778975253000,0.00000000],[1778975564000,0.00000000],[1778975893000,0.00000000],[1778976212000,0.00000000],[1778976468000,0.00000000],[1778976789000,0.00000000],[1778977109000,0.00000000],[1778977365000,0.00000000],[1778977685000,0.00000000],[1778977954000,0.00000000],[1778978277000,0.00000000],[1778978597000,0.00000000],[1778978853000,0.00000000],[1778979173000,0.00000000],[1778979493000,0.00000000],[1778979813000,0.00000000],[1778980066000,0.00000000],[1778980389000,0.00000000],[1778980709000,0.00000000],[1778980965000,0.00000000],[1778981285000,0.00000000],[1778981602000,0.00000000],[1778981858000,0.00000000],[1778982181000,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: [[1778968853000,0.00000000],[1778968981000,0.00000000],[1778969252000,0.00000000],[1778969574000,0.00000000],[1778969894000,0.00000000],[1778970212000,0.00000000],[1778970460000,0.00000000],[1778970773000,0.00000000],[1778971093000,0.00000000],[1778971412000,0.00000000],[1778971666000,0.00000000],[1778971989000,0.00000000],[1778972309000,0.00000000],[1778972560000,0.00000000],[1778972902000,0.00000000],[1778973154000,0.00000000],[1778973493000,0.00000000],[1778973813000,0.00000000],[1778974101000,0.00000000],[1778974353000,0.00000000],[1778974677000,0.00000000],[1778974997000,0.00000000],[1778975253000,0.00000000],[1778975564000,0.00000000],[1778975893000,0.00000000],[1778976212000,0.00000000],[1778976468000,0.00000000],[1778976789000,0.00000000],[1778977109000,0.00000000],[1778977365000,0.00000000],[1778977685000,0.00000000],[1778977954000,0.00000000],[1778978277000,0.00000000],[1778978597000,0.00000000],[1778978853000,0.00000000],[1778979173000,0.00000000],[1778979493000,0.00000000],[1778979813000,0.00000000],[1778980066000,0.00000000],[1778980389000,0.00000000],[1778980709000,0.00000000],[1778980965000,0.00000000],[1778981285000,0.00000000],[1778981602000,0.00000000],[1778981858000,0.00000000],[1778982181000,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; }