var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1778968824000,11.60000000],[1778968952000,11.64000000],[1778969272000,11.74000000],[1778969592000,11.80000000],[1778969912000,11.80000000],[1778970168000,11.80000000],[1778970488000,11.80000000],[1778970808000,11.77500000],[1778971064000,11.70000000],[1778971384000,11.70000000],[1778971704000,11.70000000],[1778971960000,11.64000000],[1778972280000,11.72000000],[1778972600000,11.80000000],[1778972856000,11.80000000],[1778973176000,11.80000000],[1778973496000,11.77500000],[1778973752000,11.72000000],[1778974072000,11.70000000],[1778974392000,11.78000000],[1778974712000,11.70000000],[1778974968000,11.54000000],[1778975288000,11.50000000],[1778975608000,11.55000000],[1778975864000,11.60000000],[1778976184000,11.52000000],[1778976504000,11.55000000],[1778976760000,11.60000000],[1778977080000,11.54000000],[1778977400000,11.50000000],[1778977656000,11.44000000],[1778977976000,11.40000000],[1778978298000,11.50000000],[1778978551000,11.46000000],[1778978871000,11.38000000],[1778979191000,11.22000000],[1778979511000,11.20000000],[1778979767000,11.20000000],[1778980087000,11.20000000],[1778980407000,11.15000000],[1778980663000,11.18000000],[1778980983000,11.20000000],[1778981303000,11.17500000],[1778981559000,11.18000000],[1778981879000,11.20000000],[1778982199000,11.25000000],[1778982455000,11.20000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1778968824000,9.7],[1778968952000,9.6],[1778969272000,9.5],[1778969592000,9.5],[1778969912000,9.5],[1778970168000,9.5],[1778970488000,9.4],[1778970808000,9.4],[1778971064000,9.4],[1778971384000,9.4],[1778971704000,9.3],[1778971960000,9.3],[1778972280000,9.2],[1778972600000,9.2],[1778972856000,9.2],[1778973176000,9.2],[1778973496000,9.1],[1778973752000,9.1],[1778974072000,9],[1778974392000,9.1],[1778974712000,9.1],[1778974968000,9.1],[1778975288000,9],[1778975608000,8.9],[1778975864000,8.9],[1778976184000,8.9],[1778976504000,8.7],[1778976760000,8.7],[1778977080000,8.7],[1778977400000,8.7],[1778977656000,8.6],[1778977976000,8.5],[1778978298000,8.5],[1778978551000,8.6],[1778978871000,8.7],[1778979191000,8.7],[1778979511000,8.7],[1778979767000,8.7],[1778980087000,8.7],[1778980407000,8.7],[1778980663000,8.5],[1778980983000,8.6],[1778981303000,8.5],[1778981559000,8.5],[1778981879000,8.5],[1778982199000,8.4],[1778982455000,8.4],], 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: [[1778968824000,88.00000000],[1778968952000,87.20000000],[1778969272000,86.40000000],[1778969592000,86.00000000],[1778969912000,86.00000000],[1778970168000,86.00000000],[1778970488000,85.20000000],[1778970808000,85.75000000],[1778971064000,86.00000000],[1778971384000,85.80000000],[1778971704000,85.50000000],[1778971960000,85.80000000],[1778972280000,84.60000000],[1778972600000,84.00000000],[1778972856000,84.00000000],[1778973176000,84.00000000],[1778973496000,84.00000000],[1778973752000,84.20000000],[1778974072000,83.80000000],[1778974392000,83.80000000],[1778974712000,84.25000000],[1778974968000,85.00000000],[1778975288000,85.00000000],[1778975608000,84.00000000],[1778975864000,83.60000000],[1778976184000,84.00000000],[1778976504000,82.75000000],[1778976760000,82.80000000],[1778977080000,83.00000000],[1778977400000,83.00000000],[1778977656000,83.00000000],[1778977976000,82.80000000],[1778978298000,82.25000000],[1778978551000,83.00000000],[1778978871000,83.80000000],[1778979191000,84.60000000],[1778979511000,85.00000000],[1778979767000,84.60000000],[1778980087000,84.60000000],[1778980407000,85.00000000],[1778980663000,84.00000000],[1778980983000,84.00000000],[1778981303000,83.75000000],[1778981559000,84.00000000],[1778981879000,83.40000000],[1778982199000,83.00000000],[1778982455000,83.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: [[1778968824000,1007],[1778968952000,1006.9],[1778969272000,1006.8],[1778969592000,1006.9],[1778969912000,1007],[1778970168000,1007],[1778970488000,1007],[1778970808000,1007.2],[1778971064000,1007],[1778971384000,1007.1],[1778971704000,1007.2],[1778971960000,1007.2],[1778972280000,1007.2],[1778972600000,1007.3],[1778972856000,1007.3],[1778973176000,1007.3],[1778973496000,1007.5],[1778973752000,1007.4],[1778974072000,1007.4],[1778974392000,1007.5],[1778974712000,1007.5],[1778974968000,1007.6],[1778975288000,1007.6],[1778975608000,1007.7],[1778975864000,1007.7],[1778976184000,1007.7],[1778976504000,1007.7],[1778976760000,1007.8],[1778977080000,1007.9],[1778977400000,1007.9],[1778977656000,1007.9],[1778977976000,1008],[1778978298000,1008.1],[1778978551000,1008],[1778978871000,1008.2],[1778979191000,1008.2],[1778979511000,1008.2],[1778979767000,1008.2],[1778980087000,1008.2],[1778980407000,1008.2],[1778980663000,1008.3],[1778980983000,1008.3],[1778981303000,1008.3],[1778981559000,1008.4],[1778981879000,1008.4],[1778982199000,1008.4],[1778982455000,1008.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: [[1778968824000,5.04],[1778968952000,4.104],[1778969272000,6.84],[1778969592000,7.848],[1778969912000,7.47],[1778970168000,7.272],[1778970488000,7.488],[1778970808000,6.39],[1778971064000,4.752],[1778971384000,5.616],[1778971704000,5.58],[1778971960000,6.048],[1778972280000,9.288],[1778972600000,8.55],[1778972856000,8.784],[1778973176000,7.272],[1778973496000,7.2],[1778973752000,8.856],[1778974072000,7.776],[1778974392000,7.2],[1778974712000,6.57],[1778974968000,7.056],[1778975288000,5.976],[1778975608000,9.81],[1778975864000,6.696],[1778976184000,8.568],[1778976504000,9],[1778976760000,7.848],[1778977080000,7.632],[1778977400000,7.56],[1778977656000,5.256],[1778977976000,6.264],[1778978298000,8.1],[1778978551000,4.68],[1778978871000,3.6],[1778979191000,5.688],[1778979511000,7.02],[1778979767000,5.832],[1778980087000,4.464],[1778980407000,5.94],[1778980663000,5.688],[1778980983000,6.48],[1778981303000,5.85],[1778981559000,7.632],[1778981879000,8.424],[1778982199000,7.56],[1778982455000,11.52],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1778968824000,6.3],[1778968952000,5.04],[1778969272000,9.648],[1778969592000,8.568],[1778969912000,10.26],[1778970168000,9.72],[1778970488000,10.224],[1778970808000,8.91],[1778971064000,6.552],[1778971384000,9.144],[1778971704000,9],[1778971960000,9.648],[1778972280000,13.896],[1778972600000,12.15],[1778972856000,13.248],[1778973176000,11.376],[1778973496000,9.54],[1778973752000,12.24],[1778974072000,10.656],[1778974392000,9.216],[1778974712000,8.91],[1778974968000,10.224],[1778975288000,8.136],[1778975608000,14.13],[1778975864000,9.72],[1778976184000,12.312],[1778976504000,13.5],[1778976760000,10.728],[1778977080000,10.152],[1778977400000,10.26],[1778977656000,7.56],[1778977976000,10.296],[1778978298000,10.26],[1778978551000,8.64],[1778978871000,5.04],[1778979191000,8.064],[1778979511000,9.54],[1778979767000,8.64],[1778980087000,6.624],[1778980407000,10.17],[1778980663000,7.128],[1778980983000,9.072],[1778981303000,6.93],[1778981559000,10.728],[1778981879000,11.232],[1778982199000,10.26],[1778982455000,15.48],], 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: [[1778968824000,164.50000000],[1778968952000,279.40000000],[1778969272000,194.20000000],[1778969592000,346.80000000],[1778969912000,340.00000000],[1778970168000,275.00000000],[1778970488000,193.40000000],[1778970808000,256.50000000],[1778971064000,266.20000000],[1778971384000,207.60000000],[1778971704000,259.00000000],[1778971960000,147.40000000],[1778972280000,139.80000000],[1778972600000,353.50000000],[1778972856000,344.60000000],[1778973176000,270.80000000],[1778973496000,176.00000000],[1778973752000,217.00000000],[1778974072000,122.00000000],[1778974392000,199.40000000],[1778974712000,176.25000000],[1778974968000,276.60000000],[1778975288000,213.20000000],[1778975608000,249.50000000],[1778975864000,283.00000000],[1778976184000,211.80000000],[1778976504000,250.25000000],[1778976760000,335.60000000],[1778977080000,145.60000000],[1778977400000,94.75000000],[1778977656000,215.00000000],[1778977976000,274.00000000],[1778978298000,181.25000000],[1778978551000,284.20000000],[1778978871000,269.60000000],[1778979191000,246.60000000],[1778979511000,189.00000000],[1778979767000,199.60000000],[1778980087000,202.00000000],[1778980407000,324.00000000],[1778980663000,279.60000000],[1778980983000,208.20000000],[1778981303000,185.25000000],[1778981559000,144.60000000],[1778981879000,270.60000000],[1778982199000,183.00000000],[1778982455000,355.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: [[1778968824000,0.00000000],[1778968952000,0.00000000],[1778969272000,0.00000000],[1778969592000,0.00000000],[1778969912000,0.00000000],[1778970168000,0.00000000],[1778970488000,0.00000000],[1778970808000,0.00000000],[1778971064000,0.00000000],[1778971384000,0.00000000],[1778971704000,0.00000000],[1778971960000,0.00000000],[1778972280000,0.00000000],[1778972600000,0.00000000],[1778972856000,0.00000000],[1778973176000,0.00000000],[1778973496000,0.00000000],[1778973752000,0.00000000],[1778974072000,0.00000000],[1778974392000,0.00000000],[1778974712000,0.00000000],[1778974968000,0.00000000],[1778975288000,0.00000000],[1778975608000,0.00000000],[1778975864000,0.00000000],[1778976184000,0.00000000],[1778976504000,0.00000000],[1778976760000,0.00000000],[1778977080000,0.00000000],[1778977400000,0.00000000],[1778977656000,0.00000000],[1778977976000,0.00000000],[1778978298000,0.00000000],[1778978551000,0.00000000],[1778978871000,0.00000000],[1778979191000,0.00000000],[1778979511000,0.00000000],[1778979767000,0.00000000],[1778980087000,0.00000000],[1778980407000,0.00000000],[1778980663000,0.00000000],[1778980983000,0.00000000],[1778981303000,0.00000000],[1778981559000,0.00000000],[1778981879000,0.00000000],[1778982199000,0.00000000],[1778982455000,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: [[1778968824000,0.00000000],[1778968952000,0.00000000],[1778969272000,0.00000000],[1778969592000,0.00000000],[1778969912000,0.00000000],[1778970168000,0.00000000],[1778970488000,0.00000000],[1778970808000,0.00000000],[1778971064000,0.00000000],[1778971384000,0.00000000],[1778971704000,0.00000000],[1778971960000,0.00000000],[1778972280000,0.00000000],[1778972600000,0.00000000],[1778972856000,0.00000000],[1778973176000,0.00000000],[1778973496000,0.00000000],[1778973752000,0.00000000],[1778974072000,0.00000000],[1778974392000,0.00000000],[1778974712000,0.00000000],[1778974968000,0.00000000],[1778975288000,0.00000000],[1778975608000,0.00000000],[1778975864000,0.00000000],[1778976184000,0.00000000],[1778976504000,0.00000000],[1778976760000,0.00000000],[1778977080000,0.00000000],[1778977400000,0.00000000],[1778977656000,0.00000000],[1778977976000,0.00000000],[1778978298000,0.00000000],[1778978551000,0.00000000],[1778978871000,0.00000000],[1778979191000,0.00000000],[1778979511000,0.00000000],[1778979767000,0.00000000],[1778980087000,0.00000000],[1778980407000,0.00000000],[1778980663000,0.00000000],[1778980983000,0.00000000],[1778981303000,0.00000000],[1778981559000,0.00000000],[1778981879000,0.00000000],[1778982199000,0.00000000],[1778982455000,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: [[1778968824000,0.00000000],[1778968952000,0.00000000],[1778969272000,0.00000000],[1778969592000,0.00000000],[1778969912000,0.00000000],[1778970168000,0.00000000],[1778970488000,0.00000000],[1778970808000,0.00000000],[1778971064000,0.00000000],[1778971384000,0.00000000],[1778971704000,0.00000000],[1778971960000,0.00000000],[1778972280000,0.00000000],[1778972600000,0.00000000],[1778972856000,0.00000000],[1778973176000,0.00000000],[1778973496000,0.00000000],[1778973752000,0.00000000],[1778974072000,0.00000000],[1778974392000,0.00000000],[1778974712000,0.00000000],[1778974968000,0.00000000],[1778975288000,0.00000000],[1778975608000,0.00000000],[1778975864000,0.00000000],[1778976184000,0.00000000],[1778976504000,0.00000000],[1778976760000,0.00000000],[1778977080000,0.00000000],[1778977400000,0.00000000],[1778977656000,0.00000000],[1778977976000,0.00000000],[1778978298000,0.00000000],[1778978551000,0.00000000],[1778978871000,0.00000000],[1778979191000,0.00000000],[1778979511000,0.00000000],[1778979767000,0.00000000],[1778980087000,0.00000000],[1778980407000,0.00000000],[1778980663000,0.00000000],[1778980983000,0.08120000],[1778981303000,0.20300000],[1778981559000,0.20300000],[1778981879000,0.20300000],[1778982199000,0.20300000],[1778982455000,0.20300000],], 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; }