var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786917611000,25.80000000],[1786917770000,26.00000000],[1786918074000,25.21666667],[1786918378000,25.30000000],[1786918682000,25.55000000],[1786918953000,25.60000000],[1786919305000,25.72500000],[1786919578000,25.65555556],[1786919881000,25.43750000],[1786920154000,25.28750000],[1786920474000,25.32222222],[1786920777000,25.12500000],[1786921050000,24.66250000],[1786921353000,23.88750000],[1786921674000,23.70000000],[1786921977000,23.66666667],[1786922250000,23.63750000],[1786922553000,23.62222222],[1786922873000,23.60000000],[1786923177000,23.75555556],[1786923482000,23.75000000],[1786923753000,23.80000000],[1786924106000,23.90000000],[1786924378000,24.12500000],[1786924681000,24.35714286],[1786924954000,24.27500000],[1786925305000,23.87500000],[1786925577000,23.85000000],[1786925850000,24.02500000],[1786926153000,23.93750000],[1786926473000,23.95000000],[1786926777000,23.46250000],[1786927081000,23.40000000],[1786927353000,23.31111111],[1786927673000,23.28750000],[1786927977000,23.28888889],[1786928282000,23.06250000],[1786928553000,22.86250000],[1786928905000,22.76250000],[1786929178000,22.61111111],[1786929481000,22.37500000],[1786929754000,22.26250000],[1786930074000,22.46250000],[1786930377000,22.55000000],[1786930650000,22.70000000],[1786930971000,22.48571429],[1786931290000,22.23333333],[1786931577000,22.22000000],[1786931897000,22.32000000],[1786932153000,22.45000000],[1786932570000,22.65000000],[1786932777000,22.86250000],[1786933082000,23.00000000],[1786933353000,23.03750000],[1786933705000,23.06666667],[1786933978000,22.28750000],[1786934281000,22.96250000],[1786934554000,23.12500000],[1786934874000,23.04444444],[1786935177000,23.00000000],[1786935450000,23.41250000],[1786935752000,23.40000000],[1786936073000,23.61111111],[1786936377000,23.80000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786917611000,11.9],[1786917770000,12.3],[1786918074000,12.1],[1786918378000,12.2],[1786918682000,12.1],[1786918953000,12.4],[1786919305000,12.5],[1786919578000,12.5],[1786919881000,12.5],[1786920154000,12.5],[1786920474000,12.5],[1786920777000,12.6],[1786921050000,12.5],[1786921353000,12.3],[1786921674000,12.4],[1786921977000,12.3],[1786922250000,12.3],[1786922553000,12.4],[1786922873000,12.3],[1786923177000,12.2],[1786923482000,12.5],[1786923753000,12.4],[1786924106000,12.6],[1786924378000,12.5],[1786924681000,12.8],[1786924954000,13],[1786925305000,12.9],[1786925577000,12.7],[1786925850000,12.7],[1786926153000,12.5],[1786926473000,12.9],[1786926777000,13],[1786927081000,13.1],[1786927353000,13.2],[1786927673000,13.1],[1786927977000,13.1],[1786928282000,13.2],[1786928553000,13],[1786928905000,12.9],[1786929178000,13],[1786929481000,13],[1786929754000,12.9],[1786930074000,12.9],[1786930377000,13.1],[1786930650000,13.3],[1786930971000,13.4],[1786931290000,13.3],[1786931577000,13.3],[1786931897000,13.4],[1786932153000,13.2],[1786932570000,13.1],[1786932777000,13.3],[1786933082000,13.4],[1786933353000,13.4],[1786933705000,13.7],[1786933978000,13.3],[1786934281000,13.7],[1786934554000,14],[1786934874000,14.2],[1786935177000,14.5],[1786935450000,14.5],[1786935752000,14.7],[1786936073000,14.8],[1786936377000,14.3],], 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: [[1786917611000,42.00000000],[1786917770000,42.50000000],[1786918074000,44.00000000],[1786918378000,44.00000000],[1786918682000,43.12500000],[1786918953000,43.77777778],[1786919305000,43.75000000],[1786919578000,44.11111111],[1786919881000,44.62500000],[1786920154000,45.00000000],[1786920474000,45.00000000],[1786920777000,45.75000000],[1786921050000,46.87500000],[1786921353000,48.50000000],[1786921674000,49.11111111],[1786921977000,49.00000000],[1786922250000,49.12500000],[1786922553000,49.33333333],[1786922873000,49.12500000],[1786923177000,48.33333333],[1786923482000,49.37500000],[1786923753000,48.88888889],[1786924106000,49.25000000],[1786924378000,48.37500000],[1786924681000,48.71428571],[1786924954000,49.37500000],[1786925305000,50.25000000],[1786925577000,49.66666667],[1786925850000,49.12500000],[1786926153000,48.87500000],[1786926473000,50.00000000],[1786926777000,51.87500000],[1786927081000,52.42857143],[1786927353000,53.00000000],[1786927673000,53.00000000],[1786927977000,53.00000000],[1786928282000,54.00000000],[1786928553000,54.00000000],[1786928905000,54.00000000],[1786929178000,54.55555556],[1786929481000,55.62500000],[1786929754000,55.62500000],[1786930074000,55.00000000],[1786930377000,55.25000000],[1786930650000,55.33333333],[1786930971000,56.42857143],[1786931290000,57.00000000],[1786931577000,57.00000000],[1786931897000,57.00000000],[1786932153000,55.83333333],[1786932570000,55.00000000],[1786932777000,55.00000000],[1786933082000,55.00000000],[1786933353000,54.75000000],[1786933705000,55.66666667],[1786933978000,57.00000000],[1786934281000,55.87500000],[1786934554000,56.75000000],[1786934874000,57.77777778],[1786935177000,58.71428571],[1786935450000,57.25000000],[1786935752000,58.12500000],[1786936073000,57.66666667],[1786936377000,55.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: [[1786917611000,1012.6],[1786917770000,1012.5],[1786918074000,1012.8],[1786918378000,1012.8],[1786918682000,1012.6],[1786918953000,1012.6],[1786919305000,1012.6],[1786919578000,1012.6],[1786919881000,1012.5],[1786920154000,1012.6],[1786920474000,1012.7],[1786920777000,1012.6],[1786921050000,1012.5],[1786921353000,1012.7],[1786921674000,1012.7],[1786921977000,1012.6],[1786922250000,1012.6],[1786922553000,1012.6],[1786922873000,1012.6],[1786923177000,1012.6],[1786923482000,1012.5],[1786923753000,1012.4],[1786924106000,1012.3],[1786924378000,1012.3],[1786924681000,1012.3],[1786924954000,1012.2],[1786925305000,1012.1],[1786925577000,1012],[1786925850000,1012],[1786926153000,1012.1],[1786926473000,1012],[1786926777000,1012],[1786927081000,1012.2],[1786927353000,1012],[1786927673000,1012],[1786927977000,1012],[1786928282000,1012],[1786928553000,1011.8],[1786928905000,1011.9],[1786929178000,1012],[1786929481000,1012],[1786929754000,1011.9],[1786930074000,1012],[1786930377000,1011.9],[1786930650000,1011.9],[1786930971000,1012],[1786931290000,1011.9],[1786931577000,1012],[1786931897000,1012],[1786932153000,1012],[1786932570000,1012],[1786932777000,1011.9],[1786933082000,1011.9],[1786933353000,1011.8],[1786933705000,1012.2],[1786933978000,1012.2],[1786934281000,1012.3],[1786934554000,1012.3],[1786934874000,1012.5],[1786935177000,1012.5],[1786935450000,1012.4],[1786935752000,1012.3],[1786936073000,1012.2],[1786936377000,1012.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: [[1786917611000,0.839999988],[1786917770000,2.34],[1786918074000,0.119999988],[1786918378000,0.308571444],[1786918682000,0.315],[1786918953000,0],[1786919305000,0.045],[1786919578000,0.240000012],[1786919881000,0],[1786920154000,0],[1786920474000,0],[1786920777000,0],[1786921050000,1.17],[1786921353000,0.18],[1786921674000,0],[1786921977000,0],[1786922250000,0],[1786922553000,0],[1786922873000,0],[1786923177000,0],[1786923482000,0],[1786923753000,0],[1786924106000,0],[1786924378000,0],[1786924681000,0],[1786924954000,0],[1786925305000,0],[1786925577000,0],[1786925850000,0],[1786926153000,1.845],[1786926473000,0.675],[1786926777000,0.63],[1786927081000,6.12],[1786927353000,0.280000008],[1786927673000,0],[1786927977000,0.280000008],[1786928282000,0.225],[1786928553000,0],[1786928905000,0],[1786929178000,0],[1786929481000,0.54],[1786929754000,0],[1786930074000,0],[1786930377000,0],[1786930650000,0],[1786930971000,2.057142852],[1786931290000,0.839999988],[1786931577000,0],[1786931897000,0],[1786932153000,0],[1786932570000,0],[1786932777000,0],[1786933082000,0],[1786933353000,0],[1786933705000,2.099999988],[1786933978000,4.86],[1786934281000,12.24],[1786934554000,15.525],[1786934874000,13.439999988],[1786935177000,12.342857148],[1786935450000,12.24],[1786935752000,7.65],[1786936073000,9.280000008],[1786936377000,17.46],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786917611000,0.839999988],[1786917770000,3.78],[1786918074000,0.420000012],[1786918378000,1.44],[1786918682000,0.63],[1786918953000,0],[1786919305000,0.315],[1786919578000,0.280000008],[1786919881000,0],[1786920154000,0],[1786920474000,0],[1786920777000,0],[1786921050000,1.89],[1786921353000,0.315],[1786921674000,0],[1786921977000,0],[1786922250000,0],[1786922553000,0],[1786922873000,0],[1786923177000,0],[1786923482000,0],[1786923753000,0],[1786924106000,0],[1786924378000,0],[1786924681000,0],[1786924954000,0],[1786925305000,0],[1786925577000,0],[1786925850000,0],[1786926153000,1.89],[1786926473000,0.945],[1786926777000,0.945],[1786927081000,7.56],[1786927353000,0.560000016],[1786927673000,0],[1786927977000,0.560000016],[1786928282000,0.63],[1786928553000,0],[1786928905000,0],[1786929178000,0],[1786929481000,1.26],[1786929754000,0],[1786930074000,0],[1786930377000,0],[1786930650000,0],[1786930971000,2.88],[1786931290000,0.839999988],[1786931577000,0],[1786931897000,0],[1786932153000,0],[1786932570000,0],[1786932777000,0],[1786933082000,0],[1786933353000,0],[1786933705000,3.359999988],[1786933978000,6.615],[1786934281000,15.66],[1786934554000,18.945],[1786934874000,18],[1786935177000,15.737142852],[1786935450000,15.75],[1786935752000,10.53],[1786936073000,12.520000008],[1786936377000,24.3],], 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: [[1786917611000,130.33333333],[1786917770000,146.00000000],[1786918074000,156.66666667],[1786918378000,148.57142857],[1786918682000,166.00000000],[1786918953000,167.00000000],[1786919305000,170.62500000],[1786919578000,174.00000000],[1786919881000,178.12500000],[1786920154000,165.00000000],[1786920474000,175.22222222],[1786920777000,170.37500000],[1786921050000,150.62500000],[1786921353000,149.25000000],[1786921674000,153.33333333],[1786921977000,161.83333333],[1786922250000,160.62500000],[1786922553000,159.11111111],[1786922873000,152.62500000],[1786923177000,161.44444444],[1786923482000,163.37500000],[1786923753000,161.77777778],[1786924106000,166.75000000],[1786924378000,168.50000000],[1786924681000,167.71428571],[1786924954000,162.37500000],[1786925305000,159.50000000],[1786925577000,141.50000000],[1786925850000,138.25000000],[1786926153000,130.00000000],[1786926473000,153.75000000],[1786926777000,175.12500000],[1786927081000,186.42857143],[1786927353000,165.11111111],[1786927673000,163.12500000],[1786927977000,170.88888889],[1786928282000,170.62500000],[1786928553000,158.87500000],[1786928905000,150.37500000],[1786929178000,142.00000000],[1786929481000,148.62500000],[1786929754000,144.62500000],[1786930074000,166.12500000],[1786930377000,168.50000000],[1786930650000,184.66666667],[1786930971000,183.00000000],[1786931290000,171.00000000],[1786931577000,162.40000000],[1786931897000,151.60000000],[1786932153000,161.16666667],[1786932570000,160.83333333],[1786932777000,161.50000000],[1786933082000,160.50000000],[1786933353000,166.12500000],[1786933705000,189.50000000],[1786933978000,192.87500000],[1786934281000,253.12500000],[1786934554000,264.50000000],[1786934874000,245.77777778],[1786935177000,289.85714286],[1786935450000,209.50000000],[1786935752000,129.00000000],[1786936073000,131.55555556],[1786936377000,37.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: [[1786917611000,0.00000000],[1786917770000,0.00000000],[1786918074000,0.00000000],[1786918378000,0.00000000],[1786918682000,0.00000000],[1786918953000,0.00000000],[1786919305000,0.00000000],[1786919578000,0.00000000],[1786919881000,0.00000000],[1786920154000,0.00000000],[1786920474000,0.00000000],[1786920777000,0.00000000],[1786921050000,0.00000000],[1786921353000,0.00000000],[1786921674000,0.00000000],[1786921977000,0.00000000],[1786922250000,0.00000000],[1786922553000,0.00000000],[1786922873000,0.00000000],[1786923177000,0.00000000],[1786923482000,0.00000000],[1786923753000,0.00000000],[1786924106000,0.00000000],[1786924378000,0.00000000],[1786924681000,0.00000000],[1786924954000,0.00000000],[1786925305000,0.00000000],[1786925577000,0.00000000],[1786925850000,0.00000000],[1786926153000,0.00000000],[1786926473000,0.00000000],[1786926777000,0.00000000],[1786927081000,0.00000000],[1786927353000,0.00000000],[1786927673000,0.00000000],[1786927977000,0.00000000],[1786928282000,0.00000000],[1786928553000,0.00000000],[1786928905000,0.00000000],[1786929178000,0.00000000],[1786929481000,0.00000000],[1786929754000,0.00000000],[1786930074000,0.00000000],[1786930377000,0.00000000],[1786930650000,0.00000000],[1786930971000,0.00000000],[1786931290000,0.00000000],[1786931577000,0.00000000],[1786931897000,0.00000000],[1786932153000,0.00000000],[1786932570000,0.00000000],[1786932777000,0.00000000],[1786933082000,0.00000000],[1786933353000,0.00000000],[1786933705000,0.00000000],[1786933978000,0.00000000],[1786934281000,0.00000000],[1786934554000,0.00000000],[1786934874000,0.00000000],[1786935177000,0.00000000],[1786935450000,0.00000000],[1786935752000,0.00000000],[1786936073000,0.00000000],[1786936377000,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: [[1786917611000,0.00000000],[1786917770000,0.00000000],[1786918074000,0.00000000],[1786918378000,0.00000000],[1786918682000,0.00000000],[1786918953000,0.00000000],[1786919305000,0.00000000],[1786919578000,0.00000000],[1786919881000,0.00000000],[1786920154000,0.00000000],[1786920474000,0.00000000],[1786920777000,0.00000000],[1786921050000,0.00000000],[1786921353000,0.00000000],[1786921674000,0.00000000],[1786921977000,0.00000000],[1786922250000,0.00000000],[1786922553000,0.00000000],[1786922873000,0.00000000],[1786923177000,0.00000000],[1786923482000,0.00000000],[1786923753000,0.00000000],[1786924106000,0.00000000],[1786924378000,0.00000000],[1786924681000,0.00000000],[1786924954000,0.00000000],[1786925305000,0.00000000],[1786925577000,0.00000000],[1786925850000,0.00000000],[1786926153000,0.00000000],[1786926473000,0.00000000],[1786926777000,0.00000000],[1786927081000,0.00000000],[1786927353000,0.00000000],[1786927673000,0.00000000],[1786927977000,0.00000000],[1786928282000,0.00000000],[1786928553000,0.00000000],[1786928905000,0.00000000],[1786929178000,0.00000000],[1786929481000,0.00000000],[1786929754000,0.00000000],[1786930074000,0.00000000],[1786930377000,0.00000000],[1786930650000,0.00000000],[1786930971000,0.00000000],[1786931290000,0.00000000],[1786931577000,0.00000000],[1786931897000,0.00000000],[1786932153000,0.00000000],[1786932570000,0.00000000],[1786932777000,0.00000000],[1786933082000,0.00000000],[1786933353000,0.00000000],[1786933705000,0.00000000],[1786933978000,0.00000000],[1786934281000,0.00000000],[1786934554000,0.00000000],[1786934874000,0.00000000],[1786935177000,0.00000000],[1786935450000,0.00000000],[1786935752000,0.00000000],[1786936073000,0.00000000],[1786936377000,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: [[1786917611000,0.00000000],[1786917770000,0.00000000],[1786918074000,0.00000000],[1786918378000,0.00000000],[1786918682000,0.00000000],[1786918953000,0.00000000],[1786919305000,0.00000000],[1786919578000,0.00000000],[1786919881000,0.00000000],[1786920154000,0.00000000],[1786920474000,0.00000000],[1786920777000,0.00000000],[1786921050000,0.00000000],[1786921353000,0.00000000],[1786921674000,0.00000000],[1786921977000,0.00000000],[1786922250000,0.00000000],[1786922553000,0.00000000],[1786922873000,0.00000000],[1786923177000,0.00000000],[1786923482000,0.00000000],[1786923753000,0.00000000],[1786924106000,0.00000000],[1786924378000,0.00000000],[1786924681000,0.00000000],[1786924954000,0.00000000],[1786925305000,0.00000000],[1786925577000,0.00000000],[1786925850000,0.00000000],[1786926153000,0.00000000],[1786926473000,0.00000000],[1786926777000,0.00000000],[1786927081000,0.00000000],[1786927353000,0.00000000],[1786927673000,0.00000000],[1786927977000,0.00000000],[1786928282000,0.00000000],[1786928553000,0.00000000],[1786928905000,0.00000000],[1786929178000,0.00000000],[1786929481000,0.00000000],[1786929754000,0.00000000],[1786930074000,0.00000000],[1786930377000,0.00000000],[1786930650000,0.00000000],[1786930971000,0.00000000],[1786931290000,0.00000000],[1786931577000,0.00000000],[1786931897000,0.00000000],[1786932153000,0.00000000],[1786932570000,0.00000000],[1786932777000,0.00000000],[1786933082000,0.00000000],[1786933353000,0.00000000],[1786933705000,0.00000000],[1786933978000,0.00000000],[1786934281000,0.00000000],[1786934554000,0.00000000],[1786934874000,0.00000000],[1786935177000,0.00000000],[1786935450000,0.00000000],[1786935752000,0.00000000],[1786936073000,0.00000000],[1786936377000,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; }