var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [], 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); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1568628721000,56.10000000],[1568628781000,56.16000000],[1568629081000,57.82000000],[1568629381000,55.36000000],[1568629681000,54.50000000],[1568629981000,53.96000000],[1568630281000,54.36000000],[1568630581000,55.32000000],[1568630881000,53.78000000],[1568631181000,55.84000000],[1568631481000,53.48000000],[1568631781000,54.40000000],[1568632081000,52.37500000],[1568645341000,44.20000000],[1568645581000,43.52000000],[1568645881000,44.34000000],[1568646181000,44.84000000],[1568646481000,44.24000000],[1568646782000,44.18000000],[1568647081000,44.16000000],[1568647381000,44.76000000],[1568647681000,44.44000000],[1568647981000,43.92000000],[1568648281000,44.16000000],[1568648581000,44.56000000],[1568648881000,44.54000000],[1568649181000,44.36000000],[1568649481000,44.72000000],[1568649781000,45.50000000],[1568650082000,47.08000000],[1568650381000,47.10000000],[1568650681000,47.28000000],[1568650981000,48.26000000],[1568651281000,50.76000000],[1568651581000,52.16000000],[1568651881000,53.22000000],[1568652182000,54.04000000],[1568652481000,55.22000000],[1568652781000,55.98000000],[1568653081000,56.66000000],[1568653381000,57.38000000],[1568653681000,58.28000000],[1568653981000,58.54000000],[1568654281000,59.00000000],[1568654581000,59.26000000],[1568654881000,60.26000000],[1568655181000,60.70000000],[1568655481000,60.84000000],[1568655781000,61.06000000],[1568656081000,61.86000000],[1568656381000,62.12000000],[1568656681000,62.56000000],[1568656981000,63.30000000],[1568657281000,63.00000000],[1568657581000,63.56000000],[1568657881000,64.14000000],[1568658181000,64.26000000],[1568658481000,64.42000000],[1568658781000,64.96000000],[1568659081000,65.72000000],[1568659381000,65.92000000],[1568659681000,66.84000000],[1568659981000,66.68000000],[1568660281000,66.76000000],[1568660581000,66.48000000],[1568660881000,66.20000000],[1568661181000,66.58000000],[1568661482000,65.80000000],[1568661781000,66.44000000],[1568662081000,66.22000000],[1568662381000,65.82000000],[1568662681000,65.60000000],[1568662981000,65.72000000],[1568663281000,65.20000000],[1568663581000,65.04000000],[1568663881000,65.38000000],[1568664181000,64.60000000],[1568664481000,64.58000000],[1568664781000,63.88000000],[1568665081000,64.24000000],[1568665381000,63.88000000],[1568665681000,63.54000000],[1568665981000,63.86000000],[1568666281000,64.18000000],[1568666581000,64.68000000],[1568666881000,64.60000000],[1568667181000,64.60000000],[1568667481000,64.36000000],[1568667781000,64.28000000],[1568668081000,62.98000000],[1568668381000,62.56000000],[1568668681000,62.34000000],[1568668981000,62.56000000],[1568669281000,62.94000000],[1568669582000,62.94000000],[1568669881000,62.98000000],[1568670181000,63.54000000],[1568670481000,63.66000000],[1568670781000,63.16000000],[1568671081000,63.60000000],], 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); }); $('.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; }