var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1579474801000,-1.30000000],[1579474981000,-1.36000000],[1579475281000,-1.30000000],[1579475582000,-1.32000000],[1579475881000,-1.36000000],[1579476181000,-1.36000000],[1579476482000,-1.32000000],[1579476781000,-1.30000000],[1579477082000,-1.30000000],[1579477382000,-1.30000000],[1579477681000,-1.30000000],[1579477981000,-1.28000000],[1579478281000,-1.24000000],[1579478582000,-1.24000000],[1579478881000,-1.20000000],[1579479181000,-1.28000000],[1579479481000,-1.36000000],[1579479782000,-1.34000000],[1579480081000,-1.28000000],[1579480381000,-1.24000000],[1579480681000,-1.26000000],[1579480982000,-1.28000000],[1579481281000,-1.24000000],[1579481582000,-1.30000000],[1579481882000,-1.30000000],[1579482181000,-1.30000000],[1579482481000,-1.32000000],[1579482782000,-1.28000000],[1579483081000,-1.20000000],[1579483381000,-1.20000000],[1579483682000,-1.22000000],[1579483981000,-1.30000000],[1579484281000,-1.26000000],[1579484581000,-1.20000000],[1579484882000,-1.20000000],[1579485181000,-1.20000000],[1579485481000,-1.22000000],[1579485782000,-1.20000000],[1579486081000,-1.28000000],[1579486382000,-1.30000000],[1579486681000,-1.28000000],[1579486981000,-1.30000000],[1579487281000,-1.20000000],[1579487582000,-1.22000000],[1579487882000,-1.30000000],[1579488181000,-1.30000000],[1579488482000,-1.30000000],[1579488781000,-1.32000000],[1579489081000,-1.26000000],[1579489382000,-1.26000000],[1579489681000,-1.26000000],[1579489981000,-1.36000000],[1579490281000,-1.46000000],[1579490582000,-1.50000000],[1579490881000,-1.52000000],[1579491181000,-1.52000000],[1579491482000,-1.44000000],[1579491781000,-1.44000000],[1579492081000,-1.78000000],[1579492382000,-1.76000000],[1579492681000,-1.62000000],[1579492981000,-1.60000000],[1579493282000,-1.58000000],[1579493582000,-1.70000000],[1579493881000,-1.66000000],[1579494181000,-1.66000000],[1579494482000,-1.56000000],[1579494782000,-1.60000000],[1579495081000,-1.70000000],[1579495381000,-1.62000000],[1579495681000,-1.80000000],[1579495982000,-1.90000000],[1579496281000,-1.88000000],[1579496581000,-1.86000000],[1579496882000,-1.86000000],[1579497181000,-1.94000000],[1579497481000,-1.72000000],[1579497782000,-1.70000000],[1579498081000,-1.80000000],[1579498381000,-1.62000000],[1579498682000,-1.56000000],[1579498981000,-1.66000000],[1579499281000,-1.50000000],[1579499581000,-1.78000000],[1579499882000,-2.10000000],[1579500181000,-2.18000000],[1579500482000,-2.72000000],[1579500781000,-2.66000000],[1579501081000,-2.76000000],[1579501382000,-2.90000000],[1579501681000,-3.00000000],[1579501981000,-2.58000000],[1579502282000,-2.64000000],[1579502581000,-2.20000000],[1579502881000,-1.76000000],[1579503181000,-2.50000000],[1579503482000,-2.76000000],[1579503782000,-2.76000000],[1579504081000,-2.90000000],[1579504382000,-2.84000000],[1579504681000,-2.88000000],[1579504981000,-2.86000000],[1579505281000,-2.78000000],[1579505581000,-2.84000000],[1579505882000,-2.62000000],[1579506181000,-2.06000000],[1579506481000,-1.70000000],[1579506781000,-1.88000000],[1579507081000,-2.16000000],[1579507381000,-2.02000000],[1579507682000,-2.22000000],[1579507981000,-2.52000000],[1579508281000,-2.94000000],[1579508581000,-3.24000000],[1579508882000,-3.08000000],[1579509181000,-2.88000000],[1579509481000,-2.62000000],[1579509782000,-2.44000000],[1579510081000,-2.38000000],[1579510381000,-2.28000000],[1579510681000,-1.94000000],[1579510981000,-1.96000000],[1579511282000,-1.78000000],[1579511581000,-1.38000000],[1579511881000,-1.02000000],[1579512182000,-0.82000000],[1579512482000,-0.32000000],[1579512781000,-0.38000000],[1579513081000,-0.46000000],[1579513382000,-0.54000000],[1579513681000,-0.72000000],[1579513981000,-0.56000000],[1579514282000,-0.24000000],[1579514581000,0.00000000],[1579514881000,0.08000000],[1579515182000,0.78000000],[1579515481000,1.12000000],[1579515781000,1.34000000],[1579516082000,1.14000000],[1579516381000,1.12000000],[1579516681000,1.34000000],[1579516981000,1.36000000],[1579517281000,1.50000000],[1579517581000,1.66000000],[1579517881000,1.80000000],[1579518182000,1.82000000],[1579518481000,1.90000000],[1579518781000,2.00000000],[1579519082000,1.84000000],[1579519382000,1.56000000],[1579519681000,1.46000000],[1579519981000,1.52000000],[1579520282000,1.00000000],[1579520581000,0.54000000],[1579520881000,-0.04000000],[1579521181000,0.02000000],[1579521482000,0.12000000],[1579521781000,-0.08000000],[1579522081000,-0.24000000],[1579522382000,-0.24000000],[1579522681000,-0.36000000],[1579522982000,-0.34000000],[1579523281000,-0.30000000],[1579523581000,-0.52000000],[1579523882000,-0.78000000],[1579524181000,-0.78000000],[1579524481000,-0.68000000],[1579524782000,-0.64000000],[1579525081000,-0.74000000],[1579525382000,-0.76000000],[1579525681000,-1.00000000],[1579525981000,-0.84000000],[1579526282000,-0.92000000],[1579526581000,-0.90000000],[1579526881000,-0.76000000],[1579527182000,-0.74000000],[1579527481000,-0.68000000],[1579527782000,-0.76000000],[1579528082000,-0.78000000],[1579528381000,-0.82000000],[1579528681000,-1.12000000],[1579528982000,-1.12000000],[1579529281000,-1.02000000],[1579529581000,-1.06000000],[1579529882000,-1.36000000],[1579530181000,-1.36000000],[1579530481000,-1.36000000],[1579530781000,-1.40000000],[1579531081000,-1.34000000],[1579531381000,-1.34000000],[1579531682000,-1.46000000],[1579531981000,-1.44000000],[1579532281000,-1.40000000],[1579532581000,-1.38000000],[1579532882000,-1.48000000],[1579533182000,-1.56000000],[1579533481000,-1.66000000],[1579533782000,-1.70000000],[1579534081000,-1.82000000],[1579534382000,-1.78000000],[1579534681000,-1.88000000],[1579534981000,-2.06000000],[1579535282000,-1.70000000],[1579535581000,-1.78000000],[1579535882000,-1.88000000],[1579536181000,-1.86000000],[1579536481000,-1.92000000],[1579536782000,-1.82000000],[1579537081000,-1.92000000],[1579537381000,-2.00000000],[1579537681000,-2.06000000],[1579537981000,-2.06000000],[1579538281000,-2.16000000],[1579538581000,-2.20000000],[1579538881000,-2.24000000],[1579539181000,-2.22000000],[1579539481000,-2.30000000],[1579539782000,-2.26000000],[1579540081000,-2.20000000],[1579540381000,-2.36000000],[1579540682000,-2.34000000],[1579540981000,-2.28000000],[1579541281000,-2.36000000],[1579541582000,-2.44000000],[1579541881000,-2.50000000],[1579542181000,-2.48000000],[1579542481000,-2.54000000],[1579542781000,-2.58000000],[1579543081000,-2.54000000],[1579543381000,-2.44000000],[1579543681000,-2.44000000],[1579543981000,-2.40000000],[1579544281000,-2.40000000],[1579544582000,-2.36000000],[1579544881000,-2.42000000],[1579545181000,-2.44000000],[1579545481000,-2.48000000],[1579545781000,-2.42000000],[1579546081000,-2.50000000],[1579546381000,-2.58000000],[1579546681000,-2.62000000],[1579546981000,-2.64000000],[1579547281000,-2.80000000],[1579547581000,-2.80000000],[1579547881000,-2.74000000],[1579548181000,-2.88000000],[1579548482000,-2.90000000],[1579548782000,-2.88000000],[1579549081000,-2.80000000],[1579549381000,-2.88000000],[1579549681000,-2.94000000],[1579549981000,-3.02000000],[1579550281000,-3.04000000],[1579550581000,-3.10000000],[1579550881000,-3.18000000],[1579551181000,-3.20000000],[1579551481000,-3.24000000],[1579551781000,-3.14000000],[1579552082000,-3.14000000],[1579552381000,-3.32000000],[1579552681000,-3.28000000],[1579552982000,-3.18000000],[1579553281000,-3.36000000],[1579553581000,-3.32000000],[1579553882000,-3.44000000],[1579554181000,-3.54000000],[1579554481000,-3.50000000],[1579554781000,-3.64000000],[1579555082000,-3.60000000],[1579555381000,-3.70000000],[1579555681000,-3.74000000],[1579555981000,-3.76000000],[1579556282000,-3.72000000],[1579556582000,-3.78000000],[1579556881000,-3.80000000],[1579557182000,-3.76000000],[1579557481000,-3.78000000],[1579557781000,-3.78000000],[1579558081000,-4.00000000],[1579558382000,-3.94000000],[1579558681000,-4.02000000],[1579558982000,-4.10000000],[1579559281000,-4.22000000],[1579559581000,-4.32000000],[1579559881000,-4.38000000],[1579560182000,-4.30000000],[1579560482000,-4.30000000],[1579560781000,-4.38000000],[1579561081000,-4.35000000],], 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; }