var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1776463240000,11.00000000],[1776463367000,11.38000000],[1776463687000,11.64000000],[1776464007000,11.67500000],[1776464263000,11.56000000],[1776464583000,11.42000000],[1776464903000,11.35000000],[1776465159000,11.20000000],[1776465479000,11.12000000],[1776465799000,11.00000000],[1776466051000,11.10000000],[1776466375000,11.12000000],[1776466695000,11.15000000],[1776466951000,11.06000000],[1776467270000,11.00000000],[1776467590000,10.94000000],[1776467911000,10.97500000],[1776468167000,10.70000000],[1776468487000,10.70000000],[1776468807000,10.60000000],[1776469063000,10.40000000],[1776469383000,10.37500000],[1776469654000,10.38000000],[1776469977000,10.14000000],[1776470296000,9.87500000],[1776470551000,9.76000000],[1776470872000,9.46000000],[1776471192000,9.72000000],[1776471512000,9.75000000],[1776471768000,9.08000000],[1776472088000,8.36000000],[1776472408000,8.70000000],[1776472663000,8.86000000],[1776472984000,9.24000000],[1776473304000,9.37500000],[1776473560000,9.56000000],[1776473880000,9.82000000],[1776474199000,9.95000000],[1776474453000,10.08000000],[1776474760000,10.20000000],[1776475080000,10.24000000],[1776475400000,10.27500000],[1776475654000,10.38000000],[1776475976000,10.36000000],[1776476296000,10.37500000],[1776476552000,9.98000000],[1776476872000,8.25000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1776463240000,4.3],[1776463367000,4.2],[1776463687000,4.3],[1776464007000,4.2],[1776464263000,4.2],[1776464583000,4.2],[1776464903000,4.3],[1776465159000,4.3],[1776465479000,4.3],[1776465799000,4.2],[1776466051000,4.2],[1776466375000,4.2],[1776466695000,4.1],[1776466951000,4.1],[1776467270000,4.1],[1776467590000,4],[1776467911000,4],[1776468167000,3.9],[1776468487000,3.9],[1776468807000,3.9],[1776469063000,3.7],[1776469383000,3.6],[1776469654000,3.6],[1776469977000,3.4],[1776470296000,3.3],[1776470551000,3.2],[1776470872000,3.1],[1776471192000,2.9],[1776471512000,3.1],[1776471768000,3.2],[1776472088000,3],[1776472408000,3.1],[1776472663000,3],[1776472984000,2.9],[1776473304000,2.8],[1776473560000,2.5],[1776473880000,2.4],[1776474199000,2.1],[1776474453000,2.1],[1776474760000,1.9],[1776475080000,1.8],[1776475400000,1.6],[1776475654000,1.4],[1776475976000,1.4],[1776476296000,1.1],[1776476552000,2.1],[1776476872000,2.5],], 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: [[1776463240000,63.50000000],[1776463367000,61.60000000],[1776463687000,61.00000000],[1776464007000,60.50000000],[1776464263000,61.00000000],[1776464583000,61.60000000],[1776464903000,62.00000000],[1776465159000,62.60000000],[1776465479000,63.00000000],[1776465799000,63.25000000],[1776466051000,62.80000000],[1776466375000,62.60000000],[1776466695000,62.00000000],[1776466951000,62.40000000],[1776467270000,62.80000000],[1776467590000,62.40000000],[1776467911000,62.25000000],[1776468167000,63.00000000],[1776468487000,63.00000000],[1776468807000,63.50000000],[1776469063000,63.40000000],[1776469383000,63.00000000],[1776469654000,63.00000000],[1776469977000,63.40000000],[1776470296000,64.00000000],[1776470551000,63.80000000],[1776470872000,64.80000000],[1776471192000,63.00000000],[1776471512000,63.50000000],[1776471768000,67.00000000],[1776472088000,69.40000000],[1776472408000,68.00000000],[1776472663000,67.20000000],[1776472984000,64.80000000],[1776473304000,63.75000000],[1776473560000,61.60000000],[1776473880000,60.20000000],[1776474199000,58.50000000],[1776474453000,57.80000000],[1776474760000,56.80000000],[1776475080000,56.00000000],[1776475400000,55.25000000],[1776475654000,54.20000000],[1776475976000,54.00000000],[1776476296000,52.75000000],[1776476552000,58.20000000],[1776476872000,67.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: [[1776463240000,1023.9],[1776463367000,1023.9],[1776463687000,1023.8],[1776464007000,1023.9],[1776464263000,1023.9],[1776464583000,1023.9],[1776464903000,1024.1],[1776465159000,1024.1],[1776465479000,1024],[1776465799000,1024.1],[1776466051000,1024.1],[1776466375000,1024.1],[1776466695000,1024.1],[1776466951000,1024.1],[1776467270000,1024.1],[1776467590000,1024.2],[1776467911000,1024.2],[1776468167000,1024.2],[1776468487000,1024.2],[1776468807000,1024.3],[1776469063000,1024.2],[1776469383000,1024.1],[1776469654000,1024.2],[1776469977000,1024.1],[1776470296000,1024.1],[1776470551000,1024.1],[1776470872000,1024.2],[1776471192000,1024.1],[1776471512000,1024.1],[1776471768000,1024.2],[1776472088000,1024.3],[1776472408000,1024.3],[1776472663000,1024.2],[1776472984000,1024.2],[1776473304000,1024.1],[1776473560000,1024],[1776473880000,1023.9],[1776474199000,1023.9],[1776474453000,1024],[1776474760000,1024.1],[1776475080000,1023.9],[1776475400000,1023.9],[1776475654000,1023.9],[1776475976000,1023.9],[1776476296000,1023.8],[1776476552000,1024],[1776476872000,1024.3],], 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: [[1776463240000,3.78],[1776463367000,4.896],[1776463687000,4.32],[1776464007000,4.5],[1776464263000,4.32],[1776464583000,4.896],[1776464903000,3.87],[1776465159000,4.248],[1776465479000,4.464],[1776465799000,4.5],[1776466051000,5.04],[1776466375000,4.104],[1776466695000,3.33],[1776466951000,3.456],[1776467270000,2.304],[1776467590000,4.824],[1776467911000,3.33],[1776468167000,3.6],[1776468487000,3.672],[1776468807000,3.87],[1776469063000,5.04],[1776469383000,5.4],[1776469654000,4.392],[1776469977000,4.32],[1776470296000,2.97],[1776470551000,1.8],[1776470872000,1.512],[1776471192000,0.936],[1776471512000,0],[1776471768000,0.936],[1776472088000,5.4],[1776472408000,6.66],[1776472663000,8.496],[1776472984000,7.56],[1776473304000,7.47],[1776473560000,9],[1776473880000,7.704],[1776474199000,9.81],[1776474453000,8.784],[1776474760000,8.28],[1776475080000,9.576],[1776475400000,8.64],[1776475654000,9.504],[1776475976000,7.992],[1776476296000,5.4],[1776476552000,3.24],[1776476872000,3.24],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1776463240000,3.78],[1776463367000,5.544],[1776463687000,5.04],[1776464007000,5.67],[1776464263000,5.04],[1776464583000,5.544],[1776464903000,5.04],[1776465159000,5.04],[1776465479000,5.544],[1776465799000,5.67],[1776466051000,6.048],[1776466375000,5.04],[1776466695000,5.04],[1776466951000,4.536],[1776467270000,4.536],[1776467590000,5.544],[1776467911000,5.04],[1776468167000,5.04],[1776468487000,5.04],[1776468807000,4.41],[1776469063000,5.04],[1776469383000,6.3],[1776469654000,5.04],[1776469977000,5.544],[1776470296000,3.78],[1776470551000,2.016],[1776470872000,3.024],[1776471192000,1.008],[1776471512000,0],[1776471768000,1.008],[1776472088000,7.056],[1776472408000,8.82],[1776472663000,10.728],[1776472984000,9.72],[1776473304000,9.54],[1776473560000,11.232],[1776473880000,9.648],[1776474199000,12.87],[1776474453000,11.232],[1776474760000,9.072],[1776475080000,11.232],[1776475400000,10.89],[1776475654000,12.816],[1776475976000,9.648],[1776476296000,6.3],[1776476552000,5.04],[1776476872000,3.78],], 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: [[1776463240000,331.50000000],[1776463367000,339.80000000],[1776463687000,329.40000000],[1776464007000,332.75000000],[1776464263000,335.80000000],[1776464583000,348.20000000],[1776464903000,352.50000000],[1776465159000,350.60000000],[1776465479000,346.80000000],[1776465799000,262.25000000],[1776466051000,208.60000000],[1776466375000,267.60000000],[1776466695000,257.00000000],[1776466951000,326.40000000],[1776467270000,314.80000000],[1776467590000,319.00000000],[1776467911000,326.50000000],[1776468167000,312.80000000],[1776468487000,298.60000000],[1776468807000,318.75000000],[1776469063000,305.80000000],[1776469383000,306.75000000],[1776469654000,292.20000000],[1776469977000,293.40000000],[1776470296000,297.25000000],[1776470551000,300.80000000],[1776470872000,339.00000000],[1776471192000,343.80000000],[1776471512000,185.25000000],[1776471768000,30.00000000],[1776472088000,82.00000000],[1776472408000,95.25000000],[1776472663000,75.40000000],[1776472984000,214.40000000],[1776473304000,345.75000000],[1776473560000,209.80000000],[1776473880000,276.80000000],[1776474199000,270.25000000],[1776474453000,275.60000000],[1776474760000,281.40000000],[1776475080000,213.60000000],[1776475400000,176.00000000],[1776475654000,341.60000000],[1776475976000,336.20000000],[1776476296000,6.75000000],[1776476552000,87.20000000],[1776476872000,25.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: [[1776463240000,0.00000000],[1776463367000,0.00000000],[1776463687000,0.00000000],[1776464007000,0.00000000],[1776464263000,0.00000000],[1776464583000,0.00000000],[1776464903000,0.00000000],[1776465159000,0.00000000],[1776465479000,0.00000000],[1776465799000,0.00000000],[1776466051000,0.00000000],[1776466375000,0.00000000],[1776466695000,0.00000000],[1776466951000,0.00000000],[1776467270000,0.00000000],[1776467590000,0.00000000],[1776467911000,0.00000000],[1776468167000,0.00000000],[1776468487000,0.00000000],[1776468807000,0.00000000],[1776469063000,0.00000000],[1776469383000,0.00000000],[1776469654000,0.00000000],[1776469977000,0.00000000],[1776470296000,0.00000000],[1776470551000,0.00000000],[1776470872000,0.00000000],[1776471192000,0.00000000],[1776471512000,0.00000000],[1776471768000,0.00000000],[1776472088000,0.00000000],[1776472408000,0.00000000],[1776472663000,0.00000000],[1776472984000,0.00000000],[1776473304000,0.00000000],[1776473560000,0.00000000],[1776473880000,0.00000000],[1776474199000,0.00000000],[1776474453000,0.00000000],[1776474760000,0.00000000],[1776475080000,0.00000000],[1776475400000,0.00000000],[1776475654000,0.00000000],[1776475976000,0.00000000],[1776476296000,0.00000000],[1776476552000,0.00000000],[1776476872000,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: [[1776463240000,0.00000000],[1776463367000,0.00000000],[1776463687000,0.00000000],[1776464007000,0.00000000],[1776464263000,0.00000000],[1776464583000,0.00000000],[1776464903000,0.00000000],[1776465159000,0.00000000],[1776465479000,0.00000000],[1776465799000,0.00000000],[1776466051000,0.00000000],[1776466375000,0.00000000],[1776466695000,0.00000000],[1776466951000,0.00000000],[1776467270000,0.00000000],[1776467590000,0.00000000],[1776467911000,0.00000000],[1776468167000,0.00000000],[1776468487000,0.00000000],[1776468807000,0.00000000],[1776469063000,0.00000000],[1776469383000,0.00000000],[1776469654000,0.00000000],[1776469977000,0.00000000],[1776470296000,0.00000000],[1776470551000,0.00000000],[1776470872000,0.00000000],[1776471192000,0.00000000],[1776471512000,0.00000000],[1776471768000,0.00000000],[1776472088000,0.00000000],[1776472408000,0.00000000],[1776472663000,0.00000000],[1776472984000,0.00000000],[1776473304000,0.00000000],[1776473560000,0.00000000],[1776473880000,0.00000000],[1776474199000,0.00000000],[1776474453000,0.00000000],[1776474760000,0.00000000],[1776475080000,0.00000000],[1776475400000,0.00000000],[1776475654000,0.00000000],[1776475976000,0.00000000],[1776476296000,0.00000000],[1776476552000,0.00000000],[1776476872000,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: [[1776463240000,0.00000000],[1776463367000,0.00000000],[1776463687000,0.00000000],[1776464007000,0.00000000],[1776464263000,0.00000000],[1776464583000,0.00000000],[1776464903000,0.00000000],[1776465159000,0.00000000],[1776465479000,0.00000000],[1776465799000,0.00000000],[1776466051000,0.00000000],[1776466375000,0.00000000],[1776466695000,0.00000000],[1776466951000,0.00000000],[1776467270000,0.00000000],[1776467590000,0.00000000],[1776467911000,0.00000000],[1776468167000,0.00000000],[1776468487000,0.00000000],[1776468807000,0.00000000],[1776469063000,0.00000000],[1776469383000,0.00000000],[1776469654000,0.00000000],[1776469977000,0.00000000],[1776470296000,0.00000000],[1776470551000,0.00000000],[1776470872000,0.00000000],[1776471192000,0.00000000],[1776471512000,0.00000000],[1776471768000,0.00000000],[1776472088000,0.00000000],[1776472408000,0.00000000],[1776472663000,0.00000000],[1776472984000,0.00000000],[1776473304000,0.00000000],[1776473560000,0.00000000],[1776473880000,0.00000000],[1776474199000,0.00000000],[1776474453000,0.00000000],[1776474760000,0.00000000],[1776475080000,0.00000000],[1776475400000,0.00000000],[1776475654000,0.00000000],[1776475976000,0.00000000],[1776476296000,0.00000000],[1776476552000,0.00000000],[1776476872000,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; }