var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1638831602000,-1.33333333],[1638831781000,-1.30000000],[1638832082000,-1.56000000],[1638832382000,-1.56000000],[1638832681000,-1.48000000],[1638832981000,-1.42000000],[1638833281000,-1.42000000],[1638833582000,-1.48000000],[1638833882000,-1.38000000],[1638834181000,-1.54000000],[1638834482000,-1.60000000],[1638834782000,-1.70000000],[1638835081000,-1.70000000],[1638835382000,-1.62000000],[1638835681000,-1.56000000],[1638835981000,-1.64000000],[1638836282000,-1.66000000],[1638836581000,-1.78000000],[1638836881000,-1.74000000],[1638837182000,-1.70000000],[1638837481000,-1.76000000],[1638837782000,-1.76000000],[1638838082000,-1.80000000],[1638838381000,-1.80000000],[1638838681000,-1.80000000],[1638838982000,-1.86000000],[1638839281000,-1.90000000],[1638839581000,-1.90000000],[1638839882000,-1.80000000],[1638840182000,-1.80000000],[1638840481000,-1.80000000],[1638840781000,-1.86000000],[1638841081000,-1.96000000],[1638841381000,-1.96000000],[1638841681000,-2.00000000],[1638841982000,-2.10000000],[1638842281000,-2.30000000],[1638842581000,-2.36000000],[1638842882000,-2.12000000],[1638843181000,-2.10000000],[1638843481000,-2.10000000],[1638843782000,-2.02000000],[1638844082000,-2.10000000],[1638844382000,-2.08000000],[1638844681000,-2.06000000],[1638844981000,-2.10000000],[1638845282000,-2.06000000],[1638845581000,-2.10000000],[1638845881000,-2.02000000],[1638846182000,-2.00000000],[1638846481000,-1.92000000],[1638846781000,-2.04000000],[1638847082000,-2.18000000],[1638847381000,-2.34000000],[1638847682000,-2.32000000],[1638847981000,-2.28000000],[1638848281000,-2.42000000],[1638848581000,-2.58000000],[1638848882000,-2.58000000],[1638849181000,-2.46000000],[1638849481000,-2.40000000],[1638849782000,-2.40000000],[1638850082000,-2.36000000],[1638850381000,-2.38000000],[1638850682000,-2.50000000],[1638850982000,-2.40000000],[1638851281000,-2.34000000],[1638851582000,-2.30000000],[1638851882000,-2.30000000],[1638852181000,-2.30000000],[1638852482000,-2.34000000],[1638852782000,-2.40000000],[1638853081000,-2.40000000],[1638853382000,-2.40000000],[1638853681000,-2.40000000],[1638853981000,-2.40000000],[1638854281000,-2.32000000],[1638854582000,-2.30000000],[1638854881000,-2.30000000],[1638855181000,-2.22000000],[1638855482000,-2.20000000],[1638855782000,-2.22000000],[1638856081000,-2.32000000],[1638856381000,-2.32000000],[1638856682000,-2.30000000],[1638856981000,-2.34000000],[1638857281000,-2.30000000],[1638857582000,-2.30000000],[1638857881000,-2.26000000],[1638858181000,-2.20000000],[1638858482000,-2.20000000],[1638858782000,-2.20000000],[1638859081000,-2.18000000],[1638859381000,-2.10000000],[1638859682000,-2.10000000],[1638859981000,-2.14000000],[1638860281000,-2.10000000],[1638860582000,-2.10000000],[1638860881000,-2.04000000],[1638861181000,-2.02000000],[1638861482000,-2.06000000],[1638861782000,-1.90000000],[1638862081000,-1.76000000],[1638862382000,-1.76000000],[1638862681000,-1.70000000],[1638862981000,-1.76000000],[1638863282000,-1.80000000],[1638863582000,-1.90000000],[1638863881000,-1.88000000],[1638864181000,-1.92000000],[1638864482000,-1.90000000],[1638864781000,-1.90000000],[1638865081000,-1.80000000],[1638865382000,-1.74000000],[1638865681000,-1.52000000],[1638865981000,-1.34000000],[1638866282000,-1.12000000],[1638866581000,-0.98000000],[1638866882000,-1.00000000],[1638867181000,-0.96000000],[1638867481000,-1.26000000],[1638867782000,-1.26000000],[1638868081000,-1.12000000],[1638868381000,-1.30000000],[1638868682000,-1.30000000],[1638868981000,-1.14000000],[1638869281000,-0.96000000],[1638869581000,-0.88000000],[1638869882000,-0.76000000],[1638870181000,-0.70000000],[1638870481000,-0.36000000],[1638870782000,-0.22000000],[1638871082000,0.04000000],[1638871381000,0.02000000],[1638871682000,0.14000000],[1638871982000,0.12000000],[1638872281000,0.16000000],[1638872581000,0.36000000],[1638872882000,0.38000000],[1638873182000,0.36000000],[1638873481000,0.68000000],[1638873782000,0.58000000],[1638874082000,0.48000000],[1638874381000,0.40000000],[1638874681000,0.44000000],[1638874981000,0.50000000],[1638875282000,0.50000000],[1638875582000,0.44000000],[1638875881000,0.44000000],[1638876182000,0.40000000],[1638876482000,0.60000000],[1638876781000,0.54000000],[1638877081000,0.66000000],[1638877382000,0.88000000],[1638877682000,0.94000000],[1638877981000,0.96000000],[1638878281000,1.08000000],[1638878581000,1.30000000],[1638878882000,1.34000000],[1638879181000,1.50000000],[1638879481000,1.76000000],[1638879782000,1.94000000],[1638880081000,2.16000000],[1638880381000,2.30000000],[1638880682000,2.44000000],[1638880982000,2.68000000],[1638881281000,2.44000000],[1638881582000,2.14000000],[1638881891000,2.32000000],[1638882181000,2.68000000],[1638882481000,2.84000000],[1638882783000,3.36000000],[1638883082000,3.65000000],[1638883381000,3.64000000],[1638883683000,3.96000000],[1638883983000,3.24000000],[1638884343000,2.73333333],[1638884644000,2.70000000],[1638884882000,2.45000000],[1638885183000,1.85000000],[1638885484000,1.66000000],[1638885781000,1.60000000],[1638886082000,1.60000000],[1638886384000,1.60000000],[1638886681000,1.44000000],[1638886982000,1.20000000],[1638887281000,1.30000000],[1638887581000,1.24000000],[1638887882000,0.92000000],[1638888183000,0.60000000],[1638888481000,0.63333333],[1638888783000,0.57500000],[1638889084000,0.40000000],[1638889383000,0.20000000],[1638889684000,0.08000000],[1638889981000,-0.06000000],[1638890281000,0.00000000],[1638890581000,0.04000000],[1638890882000,0.10000000],[1638891181000,-0.14000000],[1638891481000,-0.04000000],[1638891782000,0.18000000],[1638892082000,0.14000000],[1638892381000,0.04000000],[1638892681000,-0.14000000],[1638892982000,-0.18000000],[1638893344000,0.02500000],[1638893582000,0.38000000],[1638893883000,0.92500000],[1638894181000,0.67500000],[1638894482000,0.62000000],[1638894844000,0.80000000],[1638895081000,0.63333333],[1638895381000,0.80000000],[1638895744000,0.80000000],[1638896043000,0.72500000],[1638896281000,0.67500000],[1638896644000,0.35000000],[1638896883000,0.48000000],[1638897182000,0.53333333],[1638897482000,0.08000000],[1638897903000,0.00000000],[1638898081000,-0.04000000],[1638898382000,-0.32500000],[1638898683000,-0.54000000],[1638898984000,-0.45000000],[1638899281000,-0.74000000],[1638899581000,-0.76000000],[1638899882000,-0.97500000],[1638900182000,-0.85000000],[1638900483000,-0.90000000],[1638900781000,-0.82000000],[1638901081000,-0.82500000],[1638901384000,-0.70000000],[1638901682000,-0.62000000],[1638901981000,-0.95000000],[1638902281000,-0.84000000],[1638902583000,-1.04000000],[1638902881000,-1.16666667],[1638903182000,-1.06000000],[1638903481000,-1.06000000],[1638903781000,-1.14000000],[1638904082000,-1.14000000],[1638904381000,-1.38000000],[1638904682000,-1.33333333],[1638904983000,-1.46000000],[1638905282000,-1.78000000],[1638905581000,-1.58000000],[1638905883000,-1.28000000],[1638906181000,-1.08000000],[1638906481000,-0.86666667],[1638906784000,-0.90000000],[1638907082000,-1.20000000],[1638907381000,-1.27500000],[1638907681000,-1.00000000],[1638907983000,-1.04000000],[1638908284000,-1.58000000],[1638908583000,-2.32000000],[1638908881000,-2.40000000],[1638909182000,-2.47500000],[1638909482000,-2.70000000],[1638909781000,-2.64000000],[1638910081000,-2.78000000],[1638910501000,-2.86666667],[1638910743000,-2.70000000],[1638911103000,-2.65000000],[1638911283000,-2.62500000],[1638911644000,-3.07500000],[1638911882000,-3.22000000],[1638912181000,-2.86000000],[1638912481000,-3.02000000],[1638912782000,-3.08000000],[1638913081000,-3.24000000],[1638913381000,-3.14000000],[1638913681000,-3.00000000],[1638913982000,-3.00000000],[1638914281000,-2.92000000],[1638914581000,-3.00000000],[1638914882000,-3.12000000],[1638915181000,-3.20000000],[1638915481000,-3.34000000],[1638915782000,-3.40000000],[1638916081000,-3.36000000],[1638916382000,-3.24000000],[1638916681000,-3.28000000],[1638916981000,-3.42000000],[1638917281000,-3.34000000],[1638917582000,-3.42000000],[1638917881000,-3.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [], 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); }); $('.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; }