var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1766530857000,3.00000000],[1766530985000,3.00000000],[1766531305000,3.00000000],[1766531561000,3.00000000],[1766531881000,3.00000000],[1766532201000,3.00000000],[1766532457000,3.00000000],[1766532777000,2.92000000],[1766533097000,2.90000000],[1766533351000,2.88000000],[1766533673000,2.80000000],[1766533993000,2.80000000],[1766534311000,2.90000000],[1766534551000,2.90000000],[1766534859000,2.90000000],[1766535178000,2.86000000],[1766535498000,2.80000000],[1766535753000,2.80000000],[1766536074000,2.88000000],[1766536394000,2.80000000],[1766536650000,2.80000000],[1766536970000,2.72000000],[1766537290000,2.70000000],[1766537610000,2.70000000],[1766537866000,2.80000000],[1766538186000,2.78000000],[1766538506000,2.80000000],[1766538762000,2.80000000],[1766539082000,2.80000000],[1766539402000,2.80000000],[1766539658000,2.80000000],[1766539978000,2.78000000],[1766540298000,2.80000000],[1766540553000,2.70000000],[1766540875000,2.70000000],[1766541194000,2.70000000],[1766541450000,2.78000000],[1766541771000,2.80000000],[1766542090000,2.74000000],[1766542410000,2.70000000],[1766542666000,2.70000000],[1766542986000,2.70000000],[1766543307000,2.67500000],[1766543562000,2.60000000],[1766543882000,2.60000000],[1766544202000,2.60000000],[1766544458000,2.60000000],[1766544778000,2.64000000],[1766545098000,2.67500000],[1766545353000,2.68000000],[1766545674000,2.70000000],[1766545994000,2.70000000],[1766546250000,2.70000000],[1766546570000,2.66000000],[1766546890000,2.58000000],[1766547210000,2.57500000],[1766547466000,2.50000000],[1766547786000,2.50000000],[1766548106000,2.47500000],[1766548362000,2.40000000],[1766548683000,2.27500000],[1766548952000,2.24000000],[1766549273000,2.22000000],[1766549593000,2.20000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1766530857000,2],[1766530985000,2],[1766531305000,2],[1766531561000,2],[1766531881000,2],[1766532201000,2.1],[1766532457000,2.1],[1766532777000,2.1],[1766533097000,2.2],[1766533351000,2.1],[1766533673000,2.1],[1766533993000,2.1],[1766534311000,2.2],[1766534551000,2.2],[1766534859000,2.2],[1766535178000,2.1],[1766535498000,2.1],[1766535753000,2.1],[1766536074000,2.1],[1766536394000,2.1],[1766536650000,2.2],[1766536970000,2.1],[1766537290000,2.1],[1766537610000,2.1],[1766537866000,2.2],[1766538186000,2.2],[1766538506000,2.2],[1766538762000,2.2],[1766539082000,2.2],[1766539402000,2.2],[1766539658000,2.2],[1766539978000,2.2],[1766540298000,2.2],[1766540553000,2.1],[1766540875000,2.1],[1766541194000,2.1],[1766541450000,2],[1766541771000,2.1],[1766542090000,2],[1766542410000,1.8],[1766542666000,1.8],[1766542986000,1.8],[1766543307000,1.8],[1766543562000,1.9],[1766543882000,1.9],[1766544202000,1.8],[1766544458000,1.7],[1766544778000,1.7],[1766545098000,1.6],[1766545353000,1.6],[1766545674000,1.6],[1766545994000,1.6],[1766546250000,1.5],[1766546570000,1.5],[1766546890000,1.4],[1766547210000,1.4],[1766547466000,1.3],[1766547786000,1.2],[1766548106000,1.2],[1766548362000,1.2],[1766548683000,1.1],[1766548952000,1.1],[1766549273000,1],[1766549593000,1],], 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: [[1766530857000,93.00000000],[1766530985000,93.00000000],[1766531305000,93.00000000],[1766531561000,93.00000000],[1766531881000,93.40000000],[1766532201000,94.00000000],[1766532457000,94.00000000],[1766532777000,94.40000000],[1766533097000,95.00000000],[1766533351000,95.00000000],[1766533673000,95.00000000],[1766533993000,95.00000000],[1766534311000,95.00000000],[1766534551000,95.00000000],[1766534859000,95.00000000],[1766535178000,95.00000000],[1766535498000,95.00000000],[1766535753000,95.00000000],[1766536074000,95.00000000],[1766536394000,95.00000000],[1766536650000,95.60000000],[1766536970000,96.00000000],[1766537290000,96.00000000],[1766537610000,96.00000000],[1766537866000,96.00000000],[1766538186000,96.00000000],[1766538506000,96.00000000],[1766538762000,96.00000000],[1766539082000,96.00000000],[1766539402000,96.00000000],[1766539658000,96.00000000],[1766539978000,96.00000000],[1766540298000,96.00000000],[1766540553000,96.00000000],[1766540875000,96.00000000],[1766541194000,96.00000000],[1766541450000,95.00000000],[1766541771000,95.00000000],[1766542090000,94.80000000],[1766542410000,94.00000000],[1766542666000,94.00000000],[1766542986000,94.00000000],[1766543307000,94.00000000],[1766543562000,95.00000000],[1766543882000,95.00000000],[1766544202000,94.25000000],[1766544458000,94.00000000],[1766544778000,93.40000000],[1766545098000,93.00000000],[1766545353000,93.00000000],[1766545674000,92.60000000],[1766545994000,92.75000000],[1766546250000,92.00000000],[1766546570000,92.00000000],[1766546890000,92.00000000],[1766547210000,92.00000000],[1766547466000,92.00000000],[1766547786000,91.40000000],[1766548106000,91.25000000],[1766548362000,92.00000000],[1766548683000,92.00000000],[1766548952000,92.00000000],[1766549273000,92.00000000],[1766549593000,92.00000000],], 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: [[1766530857000,1023.2],[1766530985000,1023.2],[1766531305000,1023.3],[1766531561000,1023.4],[1766531881000,1023.4],[1766532201000,1023.4],[1766532457000,1023.3],[1766532777000,1023.3],[1766533097000,1023.5],[1766533351000,1023.4],[1766533673000,1023.4],[1766533993000,1023.5],[1766534311000,1023.6],[1766534551000,1023.5],[1766534859000,1023.5],[1766535178000,1023.5],[1766535498000,1023.6],[1766535753000,1023.5],[1766536074000,1023.6],[1766536394000,1023.5],[1766536650000,1023.6],[1766536970000,1023.5],[1766537290000,1023.7],[1766537610000,1023.7],[1766537866000,1023.7],[1766538186000,1023.6],[1766538506000,1023.7],[1766538762000,1023.6],[1766539082000,1023.6],[1766539402000,1023.6],[1766539658000,1023.7],[1766539978000,1023.7],[1766540298000,1023.6],[1766540553000,1023.8],[1766540875000,1023.8],[1766541194000,1023.7],[1766541450000,1023.6],[1766541771000,1023.7],[1766542090000,1023.8],[1766542410000,1023.7],[1766542666000,1023.7],[1766542986000,1023.7],[1766543307000,1023.6],[1766543562000,1023.7],[1766543882000,1023.8],[1766544202000,1023.7],[1766544458000,1023.6],[1766544778000,1023.6],[1766545098000,1023.5],[1766545353000,1023.5],[1766545674000,1023.6],[1766545994000,1023.6],[1766546250000,1023.6],[1766546570000,1023.6],[1766546890000,1023.6],[1766547210000,1023.5],[1766547466000,1023.7],[1766547786000,1023.7],[1766548106000,1023.7],[1766548362000,1023.7],[1766548683000,1023.6],[1766548952000,1023.7],[1766549273000,1023.8],[1766549593000,1023.7],], 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: [[1766530857000,4.68],[1766530985000,4.176],[1766531305000,4.77],[1766531561000,6.408],[1766531881000,6.696],[1766532201000,8.82],[1766532457000,7.344],[1766532777000,6.264],[1766533097000,6.21],[1766533351000,5.472],[1766533673000,5.976],[1766533993000,6.336],[1766534311000,7.56],[1766534551000,6.696],[1766534859000,6.984],[1766535178000,5.04],[1766535498000,4.32],[1766535753000,6.696],[1766536074000,3.456],[1766536394000,3.69],[1766536650000,2.808],[1766536970000,3.6],[1766537290000,4.032],[1766537610000,4.23],[1766537866000,5.04],[1766538186000,3.6],[1766538506000,4.77],[1766538762000,2.952],[1766539082000,3.528],[1766539402000,3.42],[1766539658000,3.528],[1766539978000,4.536],[1766540298000,2.61],[1766540553000,2.664],[1766540875000,3.096],[1766541194000,5.04],[1766541450000,6.264],[1766541771000,5.04],[1766542090000,6.48],[1766542410000,7.74],[1766542666000,11.448],[1766542986000,5.472],[1766543307000,4.14],[1766543562000,7.128],[1766543882000,6.048],[1766544202000,7.02],[1766544458000,5.76],[1766544778000,6.624],[1766545098000,6.66],[1766545353000,5.904],[1766545674000,7.416],[1766545994000,7.29],[1766546250000,7.2],[1766546570000,7.344],[1766546890000,8.28],[1766547210000,7.92],[1766547466000,9.936],[1766547786000,9.288],[1766548106000,8.91],[1766548362000,7.416],[1766548683000,7.83],[1766548952000,6.192],[1766549273000,5.688],[1766549593000,6.768],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1766530857000,6.3],[1766530985000,5.544],[1766531305000,6.3],[1766531561000,8.568],[1766531881000,8.136],[1766532201000,11.52],[1766532457000,10.224],[1766532777000,8.64],[1766533097000,8.19],[1766533351000,7.056],[1766533673000,7.56],[1766533993000,8.064],[1766534311000,8.82],[1766534551000,7.56],[1766534859000,8.064],[1766535178000,6.048],[1766535498000,5.67],[1766535753000,8.64],[1766536074000,5.04],[1766536394000,5.04],[1766536650000,4.536],[1766536970000,5.04],[1766537290000,5.616],[1766537610000,6.3],[1766537866000,6.552],[1766538186000,4.032],[1766538506000,5.67],[1766538762000,4.032],[1766539082000,4.032],[1766539402000,4.41],[1766539658000,5.544],[1766539978000,7.056],[1766540298000,3.78],[1766540553000,3.528],[1766540875000,3.528],[1766541194000,7.56],[1766541450000,8.064],[1766541771000,6.048],[1766542090000,8.568],[1766542410000,9.54],[1766542666000,14.976],[1766542986000,6.552],[1766543307000,6.93],[1766543562000,8.568],[1766543882000,7.056],[1766544202000,8.19],[1766544458000,7.56],[1766544778000,8.64],[1766545098000,8.91],[1766545353000,7.056],[1766545674000,10.152],[1766545994000,9.63],[1766546250000,9.144],[1766546570000,10.656],[1766546890000,10.08],[1766547210000,10.89],[1766547466000,12.24],[1766547786000,11.808],[1766548106000,11.52],[1766548362000,10.152],[1766548683000,9.63],[1766548952000,7.056],[1766549273000,7.056],[1766549593000,8.064],], 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: [[1766530857000,182.00000000],[1766530985000,83.20000000],[1766531305000,15.50000000],[1766531561000,14.20000000],[1766531881000,22.80000000],[1766532201000,174.50000000],[1766532457000,12.60000000],[1766532777000,11.40000000],[1766533097000,20.25000000],[1766533351000,11.40000000],[1766533673000,148.40000000],[1766533993000,82.80000000],[1766534311000,98.00000000],[1766534551000,75.40000000],[1766534859000,83.00000000],[1766535178000,16.00000000],[1766535498000,106.00000000],[1766535753000,143.80000000],[1766536074000,86.00000000],[1766536394000,17.25000000],[1766536650000,20.20000000],[1766536970000,25.00000000],[1766537290000,21.60000000],[1766537610000,17.00000000],[1766537866000,17.20000000],[1766538186000,26.40000000],[1766538506000,24.00000000],[1766538762000,17.80000000],[1766539082000,25.60000000],[1766539402000,14.50000000],[1766539658000,20.00000000],[1766539978000,17.20000000],[1766540298000,15.50000000],[1766540553000,16.80000000],[1766540875000,12.20000000],[1766541194000,182.50000000],[1766541450000,12.20000000],[1766541771000,8.60000000],[1766542090000,153.00000000],[1766542410000,93.25000000],[1766542666000,148.40000000],[1766542986000,83.80000000],[1766543307000,25.75000000],[1766543562000,78.40000000],[1766543882000,17.40000000],[1766544202000,98.50000000],[1766544458000,14.60000000],[1766544778000,79.40000000],[1766545098000,92.50000000],[1766545353000,78.20000000],[1766545674000,148.00000000],[1766545994000,96.75000000],[1766546250000,207.40000000],[1766546570000,277.80000000],[1766546890000,348.40000000],[1766547210000,177.50000000],[1766547466000,146.00000000],[1766547786000,80.20000000],[1766548106000,199.50000000],[1766548362000,213.80000000],[1766548683000,185.50000000],[1766548952000,283.80000000],[1766549273000,205.20000000],[1766549593000,205.60000000],], 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: [[1766530857000,0.00000000],[1766530985000,0.00000000],[1766531305000,0.00000000],[1766531561000,0.00000000],[1766531881000,0.00000000],[1766532201000,0.00000000],[1766532457000,0.00000000],[1766532777000,0.00000000],[1766533097000,0.00000000],[1766533351000,0.00000000],[1766533673000,0.00000000],[1766533993000,0.00000000],[1766534311000,0.00000000],[1766534551000,0.00000000],[1766534859000,0.00000000],[1766535178000,0.00000000],[1766535498000,0.00000000],[1766535753000,0.00000000],[1766536074000,0.00000000],[1766536394000,0.00000000],[1766536650000,0.00000000],[1766536970000,0.00000000],[1766537290000,0.00000000],[1766537610000,0.00000000],[1766537866000,0.00000000],[1766538186000,0.00000000],[1766538506000,0.00000000],[1766538762000,0.00000000],[1766539082000,0.00000000],[1766539402000,0.00000000],[1766539658000,0.00000000],[1766539978000,0.00000000],[1766540298000,0.00000000],[1766540553000,0.00000000],[1766540875000,0.00000000],[1766541194000,0.00000000],[1766541450000,0.00000000],[1766541771000,0.00000000],[1766542090000,0.00000000],[1766542410000,0.00000000],[1766542666000,0.00000000],[1766542986000,0.00000000],[1766543307000,0.00000000],[1766543562000,0.00000000],[1766543882000,0.00000000],[1766544202000,0.00000000],[1766544458000,0.00000000],[1766544778000,0.00000000],[1766545098000,0.00000000],[1766545353000,0.00000000],[1766545674000,0.00000000],[1766545994000,0.00000000],[1766546250000,0.00000000],[1766546570000,0.00000000],[1766546890000,0.00000000],[1766547210000,0.00000000],[1766547466000,0.00000000],[1766547786000,0.00000000],[1766548106000,0.00000000],[1766548362000,0.00000000],[1766548683000,0.00000000],[1766548952000,0.00000000],[1766549273000,0.00000000],[1766549593000,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: [[1766530857000,0.00000000],[1766530985000,0.00000000],[1766531305000,0.00000000],[1766531561000,0.00000000],[1766531881000,0.00000000],[1766532201000,0.00000000],[1766532457000,0.00000000],[1766532777000,0.00000000],[1766533097000,0.00000000],[1766533351000,0.00000000],[1766533673000,0.00000000],[1766533993000,0.00000000],[1766534311000,0.00000000],[1766534551000,0.00000000],[1766534859000,0.00000000],[1766535178000,0.00000000],[1766535498000,0.00000000],[1766535753000,0.00000000],[1766536074000,0.00000000],[1766536394000,0.00000000],[1766536650000,0.00000000],[1766536970000,0.00000000],[1766537290000,0.00000000],[1766537610000,0.00000000],[1766537866000,0.00000000],[1766538186000,0.00000000],[1766538506000,0.00000000],[1766538762000,0.00000000],[1766539082000,0.00000000],[1766539402000,0.00000000],[1766539658000,0.00000000],[1766539978000,0.00000000],[1766540298000,0.00000000],[1766540553000,0.00000000],[1766540875000,0.00000000],[1766541194000,0.00000000],[1766541450000,0.00000000],[1766541771000,0.00000000],[1766542090000,0.00000000],[1766542410000,0.00000000],[1766542666000,0.00000000],[1766542986000,0.00000000],[1766543307000,0.00000000],[1766543562000,0.00000000],[1766543882000,0.00000000],[1766544202000,0.00000000],[1766544458000,0.00000000],[1766544778000,0.00000000],[1766545098000,0.00000000],[1766545353000,0.00000000],[1766545674000,0.00000000],[1766545994000,0.00000000],[1766546250000,0.00000000],[1766546570000,0.00000000],[1766546890000,0.00000000],[1766547210000,0.00000000],[1766547466000,0.00000000],[1766547786000,0.00000000],[1766548106000,0.00000000],[1766548362000,0.00000000],[1766548683000,0.00000000],[1766548952000,0.00000000],[1766549273000,0.00000000],[1766549593000,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: [[1766530857000,0.00000000],[1766530985000,0.00000000],[1766531305000,0.00000000],[1766531561000,0.00000000],[1766531881000,0.00000000],[1766532201000,0.00000000],[1766532457000,0.00000000],[1766532777000,0.00000000],[1766533097000,0.00000000],[1766533351000,0.24400000],[1766533673000,0.30500000],[1766533993000,0.30500000],[1766534311000,0.30500000],[1766534551000,0.30500000],[1766534859000,0.30500000],[1766535178000,0.30500000],[1766535498000,0.30500000],[1766535753000,0.30500000],[1766536074000,0.30500000],[1766536394000,0.30500000],[1766536650000,0.30500000],[1766536970000,0.30500000],[1766537290000,0.42680000],[1766537610000,0.50800000],[1766537866000,0.50800000],[1766538186000,0.50800000],[1766538506000,0.50800000],[1766538762000,0.50800000],[1766539082000,0.50800000],[1766539402000,0.50800000],[1766539658000,0.50800000],[1766539978000,0.50800000],[1766540298000,0.50800000],[1766540553000,0.50800000],[1766540875000,0.50800000],[1766541194000,0.50800000],[1766541450000,0.50800000],[1766541771000,0.50800000],[1766542090000,0.61960000],[1766542410000,0.78700000],[1766542666000,0.78700000],[1766542986000,0.78700000],[1766543307000,0.78700000],[1766543562000,0.78700000],[1766543882000,0.78700000],[1766544202000,0.78700000],[1766544458000,0.78700000],[1766544778000,0.78700000],[1766545098000,0.78700000],[1766545353000,0.78700000],[1766545674000,0.78700000],[1766545994000,0.78700000],[1766546250000,0.78700000],[1766546570000,0.78700000],[1766546890000,0.78700000],[1766547210000,0.78700000],[1766547466000,0.78700000],[1766547786000,0.78700000],[1766548106000,0.78700000],[1766548362000,0.78700000],[1766548683000,0.78700000],[1766548952000,0.78700000],[1766549273000,0.78700000],[1766549593000,0.78700000],], 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; }