var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1771455636000,-3.50000000],[1771455764000,-3.56000000],[1771456084000,-3.60000000],[1771456404000,-3.60000000],[1771456660000,-3.42000000],[1771456980000,-3.28000000],[1771457300000,-3.15000000],[1771457556000,-3.10000000],[1771457876000,-3.06000000],[1771458196000,-3.00000000],[1771458452000,-2.96000000],[1771458772000,-2.88000000],[1771459092000,-2.80000000],[1771459412000,-2.80000000],[1771459668000,-2.80000000],[1771459988000,-2.80000000],[1771460308000,-2.72500000],[1771460564000,-2.68000000],[1771460884000,-2.64000000],[1771461204000,-2.62500000],[1771461460000,-2.62000000],[1771461780000,-2.62000000],[1771462100000,-2.50000000],[1771462354000,-2.50000000],[1771462676000,-2.48000000],[1771462996000,-2.40000000],[1771463252000,-2.38000000],[1771463572000,-2.30000000],[1771463892000,-2.18000000],[1771464212000,-2.10000000],[1771464468000,-2.10000000],[1771464788000,-2.02000000],[1771465108000,-1.90000000],[1771465364000,-1.90000000],[1771465684000,-1.80000000],[1771466004000,-1.80000000],[1771466260000,-1.80000000],[1771466580000,-1.80000000],[1771466900000,-1.80000000],[1771467153000,-1.80000000],[1771467476000,-1.66000000],[1771467796000,-1.60000000],[1771468052000,-1.60000000],[1771468372000,-1.60000000],[1771468692000,-1.60000000],[1771469012000,-1.60000000],[1771469268000,-1.60000000],[1771469588000,-1.60000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1771455636000,-4.1],[1771455764000,-4.1],[1771456084000,-4.2],[1771456404000,-4.2],[1771456660000,-4],[1771456980000,-3.8],[1771457300000,-3.6],[1771457556000,-3.6],[1771457876000,-3.6],[1771458196000,-3.5],[1771458452000,-3.4],[1771458772000,-3.4],[1771459092000,-3.3],[1771459412000,-3.4],[1771459668000,-3.3],[1771459988000,-3.2],[1771460308000,-3.1],[1771460564000,-3.1],[1771460884000,-3.1],[1771461204000,-3],[1771461460000,-3],[1771461780000,-3],[1771462100000,-2.9],[1771462354000,-3],[1771462676000,-3],[1771462996000,-3],[1771463252000,-2.9],[1771463572000,-2.9],[1771463892000,-2.7],[1771464212000,-2.7],[1771464468000,-2.7],[1771464788000,-2.5],[1771465108000,-2.5],[1771465364000,-2.5],[1771465684000,-2.4],[1771466004000,-2.4],[1771466260000,-2.4],[1771466580000,-2.4],[1771466900000,-2.4],[1771467153000,-2.4],[1771467476000,-2.2],[1771467796000,-2.2],[1771468052000,-2.2],[1771468372000,-2.2],[1771468692000,-2.2],[1771469012000,-2.2],[1771469268000,-2.2],[1771469588000,-2.2],], 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: [[1771455636000,96.00000000],[1771455764000,96.00000000],[1771456084000,96.00000000],[1771456404000,96.00000000],[1771456660000,96.00000000],[1771456980000,96.40000000],[1771457300000,97.00000000],[1771457556000,96.20000000],[1771457876000,96.40000000],[1771458196000,96.75000000],[1771458452000,97.00000000],[1771458772000,96.60000000],[1771459092000,96.20000000],[1771459412000,96.00000000],[1771459668000,96.60000000],[1771459988000,97.00000000],[1771460308000,97.00000000],[1771460564000,97.00000000],[1771460884000,97.00000000],[1771461204000,97.00000000],[1771461460000,97.00000000],[1771461780000,97.00000000],[1771462100000,97.00000000],[1771462354000,96.60000000],[1771462676000,96.00000000],[1771462996000,96.00000000],[1771463252000,96.00000000],[1771463572000,96.00000000],[1771463892000,96.00000000],[1771464212000,96.00000000],[1771464468000,96.00000000],[1771464788000,96.60000000],[1771465108000,96.00000000],[1771465364000,96.00000000],[1771465684000,96.00000000],[1771466004000,96.00000000],[1771466260000,96.00000000],[1771466580000,96.00000000],[1771466900000,96.00000000],[1771467153000,96.00000000],[1771467476000,96.00000000],[1771467796000,96.00000000],[1771468052000,96.00000000],[1771468372000,96.00000000],[1771468692000,96.00000000],[1771469012000,96.00000000],[1771469268000,96.00000000],[1771469588000,95.50000000],], 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: [[1771455636000,1016.3],[1771455764000,1016.3],[1771456084000,1016.3],[1771456404000,1016.3],[1771456660000,1016.2],[1771456980000,1016.2],[1771457300000,1016.3],[1771457556000,1016.2],[1771457876000,1016.3],[1771458196000,1016.1],[1771458452000,1016.1],[1771458772000,1016.1],[1771459092000,1016],[1771459412000,1015.9],[1771459668000,1015.9],[1771459988000,1016],[1771460308000,1016.1],[1771460564000,1016.1],[1771460884000,1016],[1771461204000,1015.9],[1771461460000,1015.9],[1771461780000,1015.9],[1771462100000,1015.9],[1771462354000,1015.9],[1771462676000,1015.8],[1771462996000,1015.8],[1771463252000,1015.8],[1771463572000,1015.8],[1771463892000,1015.9],[1771464212000,1015.7],[1771464468000,1015.7],[1771464788000,1015.8],[1771465108000,1015.6],[1771465364000,1015.6],[1771465684000,1015.6],[1771466004000,1015.4],[1771466260000,1015.3],[1771466580000,1015.3],[1771466900000,1015.2],[1771467153000,1015.2],[1771467476000,1015.1],[1771467796000,1015.1],[1771468052000,1015.1],[1771468372000,1015],[1771468692000,1014.9],[1771469012000,1014.8],[1771469268000,1014.9],[1771469588000,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: [[1771455636000,0],[1771455764000,0],[1771456084000,0],[1771456404000,0],[1771456660000,0],[1771456980000,0],[1771457300000,0],[1771457556000,0],[1771457876000,0],[1771458196000,0],[1771458452000,0],[1771458772000,0],[1771459092000,0],[1771459412000,0],[1771459668000,0],[1771459988000,0],[1771460308000,0],[1771460564000,0],[1771460884000,0],[1771461204000,0],[1771461460000,0],[1771461780000,0],[1771462100000,0],[1771462354000,0],[1771462676000,0],[1771462996000,0],[1771463252000,0],[1771463572000,0],[1771463892000,0],[1771464212000,0],[1771464468000,0],[1771464788000,0],[1771465108000,0],[1771465364000,0],[1771465684000,0],[1771466004000,0],[1771466260000,0],[1771466580000,0],[1771466900000,0],[1771467153000,0],[1771467476000,0.144],[1771467796000,0],[1771468052000,0],[1771468372000,0],[1771468692000,0],[1771469012000,0],[1771469268000,0.576],[1771469588000,0],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1771455636000,0],[1771455764000,0],[1771456084000,0],[1771456404000,0],[1771456660000,0],[1771456980000,0],[1771457300000,0],[1771457556000,0],[1771457876000,0],[1771458196000,0],[1771458452000,0],[1771458772000,0],[1771459092000,0],[1771459412000,0],[1771459668000,0],[1771459988000,0],[1771460308000,0],[1771460564000,0],[1771460884000,0],[1771461204000,0],[1771461460000,0],[1771461780000,0],[1771462100000,0],[1771462354000,0],[1771462676000,0],[1771462996000,0],[1771463252000,0],[1771463572000,0],[1771463892000,0],[1771464212000,0],[1771464468000,0],[1771464788000,0],[1771465108000,0],[1771465364000,0],[1771465684000,0],[1771466004000,0],[1771466260000,0],[1771466580000,0],[1771466900000,0],[1771467153000,0],[1771467476000,1.008],[1771467796000,0],[1771468052000,0],[1771468372000,0],[1771468692000,0],[1771469012000,0],[1771469268000,1.008],[1771469588000,0],], 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: [[1771455636000,356.00000000],[1771455764000,356.60000000],[1771456084000,345.00000000],[1771456404000,342.75000000],[1771456660000,347.20000000],[1771456980000,346.60000000],[1771457300000,329.50000000],[1771457556000,335.80000000],[1771457876000,345.20000000],[1771458196000,349.00000000],[1771458452000,337.80000000],[1771458772000,337.60000000],[1771459092000,348.00000000],[1771459412000,348.00000000],[1771459668000,348.00000000],[1771459988000,346.20000000],[1771460308000,348.50000000],[1771460564000,349.80000000],[1771460884000,349.20000000],[1771461204000,351.75000000],[1771461460000,350.40000000],[1771461780000,328.80000000],[1771462100000,329.00000000],[1771462354000,341.40000000],[1771462676000,345.60000000],[1771462996000,345.25000000],[1771463252000,343.40000000],[1771463572000,344.40000000],[1771463892000,351.40000000],[1771464212000,179.00000000],[1771464468000,342.00000000],[1771464788000,342.40000000],[1771465108000,332.50000000],[1771465364000,336.20000000],[1771465684000,345.20000000],[1771466004000,353.00000000],[1771466260000,353.00000000],[1771466580000,354.20000000],[1771466900000,352.00000000],[1771467153000,348.20000000],[1771467476000,336.60000000],[1771467796000,330.25000000],[1771468052000,343.60000000],[1771468372000,354.00000000],[1771468692000,349.00000000],[1771469012000,347.75000000],[1771469268000,350.80000000],[1771469588000,350.75000000],], 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: [[1771455636000,0.00000000],[1771455764000,0.00000000],[1771456084000,0.00000000],[1771456404000,0.00000000],[1771456660000,0.00000000],[1771456980000,0.00000000],[1771457300000,0.00000000],[1771457556000,0.00000000],[1771457876000,0.00000000],[1771458196000,0.00000000],[1771458452000,0.00000000],[1771458772000,0.00000000],[1771459092000,0.00000000],[1771459412000,0.00000000],[1771459668000,0.00000000],[1771459988000,0.00000000],[1771460308000,0.00000000],[1771460564000,0.00000000],[1771460884000,0.00000000],[1771461204000,0.00000000],[1771461460000,0.00000000],[1771461780000,0.00000000],[1771462100000,0.00000000],[1771462354000,0.00000000],[1771462676000,0.00000000],[1771462996000,0.00000000],[1771463252000,0.00000000],[1771463572000,0.00000000],[1771463892000,0.00000000],[1771464212000,0.00000000],[1771464468000,0.00000000],[1771464788000,0.00000000],[1771465108000,0.00000000],[1771465364000,0.00000000],[1771465684000,0.00000000],[1771466004000,0.00000000],[1771466260000,0.00000000],[1771466580000,0.00000000],[1771466900000,0.00000000],[1771467153000,0.00000000],[1771467476000,0.00000000],[1771467796000,0.00000000],[1771468052000,0.00000000],[1771468372000,0.00000000],[1771468692000,0.00000000],[1771469012000,0.00000000],[1771469268000,0.00000000],[1771469588000,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: [[1771455636000,0.00000000],[1771455764000,0.00000000],[1771456084000,0.00000000],[1771456404000,0.00000000],[1771456660000,0.00000000],[1771456980000,0.00000000],[1771457300000,0.00000000],[1771457556000,0.00000000],[1771457876000,0.00000000],[1771458196000,0.00000000],[1771458452000,0.00000000],[1771458772000,0.00000000],[1771459092000,0.00000000],[1771459412000,0.00000000],[1771459668000,0.00000000],[1771459988000,0.00000000],[1771460308000,0.00000000],[1771460564000,0.00000000],[1771460884000,0.00000000],[1771461204000,0.00000000],[1771461460000,0.00000000],[1771461780000,0.00000000],[1771462100000,0.00000000],[1771462354000,0.00000000],[1771462676000,0.00000000],[1771462996000,0.00000000],[1771463252000,0.00000000],[1771463572000,0.00000000],[1771463892000,0.00000000],[1771464212000,0.00000000],[1771464468000,0.00000000],[1771464788000,0.00000000],[1771465108000,0.00000000],[1771465364000,0.00000000],[1771465684000,0.00000000],[1771466004000,0.00000000],[1771466260000,0.00000000],[1771466580000,0.00000000],[1771466900000,0.00000000],[1771467153000,0.00000000],[1771467476000,0.00000000],[1771467796000,0.00000000],[1771468052000,0.00000000],[1771468372000,0.00000000],[1771468692000,0.00000000],[1771469012000,0.00000000],[1771469268000,0.00000000],[1771469588000,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: [[1771455636000,0.00000000],[1771455764000,0.00000000],[1771456084000,0.00000000],[1771456404000,0.00000000],[1771456660000,0.00000000],[1771456980000,0.00000000],[1771457300000,0.00000000],[1771457556000,0.00000000],[1771457876000,0.00000000],[1771458196000,0.00000000],[1771458452000,0.00000000],[1771458772000,0.00000000],[1771459092000,0.00000000],[1771459412000,0.00000000],[1771459668000,0.00000000],[1771459988000,0.00000000],[1771460308000,0.00000000],[1771460564000,0.00000000],[1771460884000,0.00000000],[1771461204000,0.00000000],[1771461460000,0.00000000],[1771461780000,0.00000000],[1771462100000,0.00000000],[1771462354000,0.00000000],[1771462676000,0.00000000],[1771462996000,0.00000000],[1771463252000,0.00000000],[1771463572000,0.00000000],[1771463892000,0.00000000],[1771464212000,0.00000000],[1771464468000,0.00000000],[1771464788000,0.00000000],[1771465108000,0.00000000],[1771465364000,0.00000000],[1771465684000,0.00000000],[1771466004000,0.00000000],[1771466260000,0.00000000],[1771466580000,0.00000000],[1771466900000,0.00000000],[1771467153000,0.00000000],[1771467476000,0.00000000],[1771467796000,0.00000000],[1771468052000,0.00000000],[1771468372000,0.00000000],[1771468692000,0.00000000],[1771469012000,0.00000000],[1771469268000,0.00000000],[1771469588000,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; }