var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1777068032000,8.70000000],[1777068241000,8.55000000],[1777068497000,8.57500000],[1777068801000,8.45000000],[1777069073000,8.40000000],[1777069397000,8.20000000],[1777069969000,7.82000000],[1777070289000,7.90000000],[1777070689000,7.86666667],[1777070881000,8.20000000],[1777071201000,8.26666667],[1777071649000,9.05000000],[1777071777000,8.96000000],[1777072097000,9.25000000],[1777072609000,9.50000000],[1777072673000,10.62000000],[1777072993000,12.04000000],[1777073569000,12.18000000],[1777073889000,11.76000000],[1777074161000,11.50000000],[1777074481000,11.14000000],[1777074801000,11.06000000],[1777075105000,10.84000000],[1777075377000,10.75000000],[1777075697000,10.97500000],[1777076001000,10.93750000],[1777076273000,10.88750000],[1777076577000,10.71250000],[1777076882000,10.62857143],[1777077152000,10.67777778],[1777077505000,10.60000000],[1777077778000,10.60000000],[1777078081000,10.52500000],[1777078352000,10.28888889],[1777078673000,10.20000000],[1777078977000,10.12500000],[1777079250000,10.06250000],[1777079552000,10.26250000],[1777079873000,10.10000000],[1777080177000,10.00000000],[1777080481000,10.00000000],[1777081009000,9.70000000],[1777081073000,9.56000000],[1777081393000,9.50000000],[1777081681000,9.34000000],[1777082001000,9.26666667],[1777082513000,9.10000000],[1777082577000,9.30000000],[1777082897000,9.64000000],[1777083409000,9.50000000],[1777083473000,9.37500000],[1777083793000,9.06666667],[1777084369000,8.88000000],[1777084689000,8.85000000],[1777085009000,8.90000000],[1777085329000,8.85000000],[1777085649000,8.70000000],[1777085905000,8.55000000],[1777086193000,8.66666667],[1777086482000,8.62500000],[1777086801000,8.56666667],[1777087249000,8.35000000],[1777087377000,8.37500000],[1777087697000,8.30000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1777068032000,3.7],[1777068241000,3.7],[1777068497000,3.7],[1777068801000,3.6],[1777069073000,3.6],[1777069397000,3.7],[1777069969000,3.4],[1777070289000,3.5],[1777070689000,3.4],[1777070881000,3.6],[1777071201000,3.3],[1777071649000,3.4],[1777071777000,3.5],[1777072097000,3.5],[1777072609000,3.6],[1777072673000,3.5],[1777072993000,4],[1777073569000,4.2],[1777073889000,4.1],[1777074161000,4],[1777074481000,4],[1777074801000,4],[1777075105000,4.1],[1777075377000,3.9],[1777075697000,4],[1777076001000,3.9],[1777076273000,3.9],[1777076577000,3.9],[1777076882000,4],[1777077152000,3.9],[1777077505000,3.9],[1777077778000,4],[1777078081000,4],[1777078352000,3.9],[1777078673000,3.8],[1777078977000,3.9],[1777079250000,3.8],[1777079552000,3.8],[1777079873000,3.8],[1777080177000,3.7],[1777080481000,3.7],[1777081009000,3.6],[1777081073000,3.5],[1777081393000,3.6],[1777081681000,3.5],[1777082001000,3.4],[1777082513000,3.4],[1777082577000,3.4],[1777082897000,3.7],[1777083409000,3.8],[1777083473000,3.7],[1777083793000,3.8],[1777084369000,3.8],[1777084689000,3.9],[1777085009000,3.9],[1777085329000,3.9],[1777085649000,3.9],[1777085905000,3.8],[1777086193000,3.8],[1777086482000,3.9],[1777086801000,3.9],[1777087249000,3.9],[1777087377000,4],[1777087697000,4],], 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: [[1777068032000,71.00000000],[1777068241000,72.00000000],[1777068497000,71.50000000],[1777068801000,72.00000000],[1777069073000,72.20000000],[1777069397000,73.40000000],[1777069969000,74.00000000],[1777070289000,74.00000000],[1777070689000,73.66666667],[1777070881000,73.00000000],[1777071201000,71.00000000],[1777071649000,68.00000000],[1777071777000,68.80000000],[1777072097000,67.50000000],[1777072609000,67.00000000],[1777072673000,61.60000000],[1777072993000,58.20000000],[1777073569000,58.40000000],[1777073889000,59.80000000],[1777074161000,60.40000000],[1777074481000,61.80000000],[1777074801000,62.00000000],[1777075105000,63.20000000],[1777075377000,63.00000000],[1777075697000,62.25000000],[1777076001000,62.12500000],[1777076273000,62.37500000],[1777076577000,63.00000000],[1777076882000,63.71428571],[1777077152000,63.11111111],[1777077505000,63.50000000],[1777077778000,63.77777778],[1777078081000,64.12500000],[1777078352000,65.00000000],[1777078673000,65.00000000],[1777078977000,65.50000000],[1777079250000,65.50000000],[1777079552000,64.37500000],[1777079873000,65.11111111],[1777080177000,65.00000000],[1777080481000,65.00000000],[1777081009000,66.00000000],[1777081073000,66.00000000],[1777081393000,67.00000000],[1777081681000,67.00000000],[1777082001000,67.00000000],[1777082513000,68.00000000],[1777082577000,67.00000000],[1777082897000,66.80000000],[1777083409000,68.00000000],[1777083473000,68.00000000],[1777083793000,69.66666667],[1777084369000,70.60000000],[1777084689000,71.25000000],[1777085009000,71.00000000],[1777085329000,71.25000000],[1777085649000,72.00000000],[1777085905000,72.25000000],[1777086193000,72.00000000],[1777086482000,72.50000000],[1777086801000,73.00000000],[1777087249000,74.00000000],[1777087377000,74.00000000],[1777087697000,74.66666667],], 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: [[1777068032000,1017.4],[1777068241000,1017.5],[1777068497000,1017.4],[1777068801000,1017.5],[1777069073000,1017.5],[1777069397000,1017.6],[1777069969000,1017.5],[1777070289000,1017.5],[1777070689000,1017.4],[1777070881000,1017.2],[1777071201000,1017.2],[1777071649000,1017.2],[1777071777000,1017.1],[1777072097000,1017.1],[1777072609000,1017.1],[1777072673000,1017],[1777072993000,1016.8],[1777073569000,1016.8],[1777073889000,1016.8],[1777074161000,1016.9],[1777074481000,1016.9],[1777074801000,1016.9],[1777075105000,1016.7],[1777075377000,1016.8],[1777075697000,1016.7],[1777076001000,1016.7],[1777076273000,1016.8],[1777076577000,1016.8],[1777076882000,1016.7],[1777077152000,1016.9],[1777077505000,1016.8],[1777077778000,1016.9],[1777078081000,1016.9],[1777078352000,1016.9],[1777078673000,1017],[1777078977000,1017],[1777079250000,1017.1],[1777079552000,1017],[1777079873000,1017.2],[1777080177000,1017.2],[1777080481000,1017.3],[1777081009000,1017.3],[1777081073000,1017.3],[1777081393000,1017.4],[1777081681000,1017.3],[1777082001000,1017.3],[1777082513000,1017.5],[1777082577000,1017.5],[1777082897000,1017.5],[1777083409000,1017.5],[1777083473000,1017.4],[1777083793000,1017.4],[1777084369000,1017.4],[1777084689000,1017.4],[1777085009000,1017.6],[1777085329000,1017.5],[1777085649000,1017.4],[1777085905000,1017.4],[1777086193000,1017.6],[1777086482000,1017.4],[1777086801000,1017.5],[1777087249000,1017.3],[1777087377000,1017.3],[1777087697000,1017.2],], 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: [[1777068032000,1.08],[1777068241000,0.9],[1777068497000,0.72],[1777068801000,1.44],[1777069073000,0.576],[1777069397000,0.288],[1777069969000,0.288],[1777070289000,0.09],[1777070689000,0.72],[1777070881000,0.09],[1777071201000,1.199999988],[1777071649000,0],[1777071777000,0],[1777072097000,0],[1777072609000,2.88],[1777072673000,10.656],[1777072993000,8.712],[1777073569000,9.36],[1777073889000,6.48],[1777074161000,7.272],[1777074481000,7.344],[1777074801000,8.64],[1777075105000,9.648],[1777075377000,8.759999988],[1777075697000,8.55],[1777076001000,7.515],[1777076273000,8.28],[1777076577000,9.9],[1777076882000,7.817142852],[1777077152000,6.720000012],[1777077505000,8.775],[1777077778000,10.760000004],[1777078081000,8.865],[1777078352000,8.120000016],[1777078673000,7.47],[1777078977000,5.58],[1777079250000,5.67],[1777079552000,6.93],[1777079873000,6.040000008],[1777080177000,6.639999984],[1777080481000,6.540000012],[1777081009000,4.32],[1777081073000,3.168],[1777081393000,4.560000012],[1777081681000,3.744],[1777082001000,3.96],[1777082513000,2.88],[1777082577000,5.832],[1777082897000,4.968],[1777083409000,2.88],[1777083473000,0.09],[1777083793000,1.140000012],[1777084369000,2.664],[1777084689000,4.68],[1777085009000,5.76],[1777085329000,5.04],[1777085649000,2.7],[1777085905000,4.95],[1777086193000,3.6],[1777086482000,5.4],[1777086801000,6.12],[1777087249000,5.22],[1777087377000,8.1],[1777087697000,5.280000012],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1777068032000,1.26],[1777068241000,2.52],[1777068497000,1.26],[1777068801000,2.52],[1777069073000,1.512],[1777069397000,0.504],[1777069969000,1.512],[1777070289000,0.63],[1777070689000,0.839999988],[1777070881000,0.63],[1777071201000,2.52],[1777071649000,0],[1777071777000,0],[1777072097000,0],[1777072609000,7.56],[1777072673000,14.832],[1777072993000,11.664],[1777073569000,13.32],[1777073889000,8.82],[1777074161000,10.728],[1777074481000,8.568],[1777074801000,10.656],[1777075105000,12.888],[1777075377000,12.840000012],[1777075697000,11.565],[1777076001000,10.17],[1777076273000,11.205],[1777076577000,12.825],[1777076882000,10.954285704],[1777077152000,8.719999992],[1777077505000,11.88],[1777077778000,14.559999984],[1777078081000,12.105],[1777078352000,9.560000016],[1777078673000,11.16],[1777078977000,7.245],[1777079250000,7.245],[1777079552000,9.225],[1777079873000,7.880000004],[1777080177000,8.679999996],[1777080481000,9.299999988],[1777081009000,7.56],[1777081073000,4.032],[1777081393000,5.879999988],[1777081681000,5.04],[1777082001000,5.879999988],[1777082513000,5.04],[1777082577000,7.56],[1777082897000,6.048],[1777083409000,5.04],[1777083473000,0.63],[1777083793000,2.099999988],[1777084369000,4.032],[1777084689000,6.3],[1777085009000,7.56],[1777085329000,6.93],[1777085649000,3.78],[1777085905000,6.3],[1777086193000,4.200000012],[1777086482000,7.56],[1777086801000,8.399999988],[1777087249000,7.56],[1777087377000,10.26],[1777087697000,6.720000012],], 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: [[1777068032000,158.50000000],[1777068241000,178.00000000],[1777068497000,176.25000000],[1777068801000,3.50000000],[1777069073000,136.00000000],[1777069397000,76.60000000],[1777069969000,212.80000000],[1777070289000,10.50000000],[1777070689000,314.33333333],[1777070881000,164.25000000],[1777071201000,304.66666667],[1777071649000,47.50000000],[1777071777000,47.20000000],[1777072097000,30.75000000],[1777072609000,59.00000000],[1777072673000,285.20000000],[1777072993000,279.80000000],[1777073569000,269.20000000],[1777073889000,279.25000000],[1777074161000,296.40000000],[1777074481000,273.40000000],[1777074801000,295.80000000],[1777075105000,291.80000000],[1777075377000,300.50000000],[1777075697000,254.50000000],[1777076001000,272.75000000],[1777076273000,287.00000000],[1777076577000,269.00000000],[1777076882000,296.14285714],[1777077152000,296.00000000],[1777077505000,279.25000000],[1777077778000,287.44444444],[1777078081000,263.25000000],[1777078352000,303.66666667],[1777078673000,295.50000000],[1777078977000,247.62500000],[1777079250000,301.37500000],[1777079552000,296.87500000],[1777079873000,237.11111111],[1777080177000,265.33333333],[1777080481000,308.83333333],[1777081009000,322.00000000],[1777081073000,303.00000000],[1777081393000,313.00000000],[1777081681000,306.00000000],[1777082001000,306.00000000],[1777082513000,350.00000000],[1777082577000,282.60000000],[1777082897000,297.00000000],[1777083409000,299.00000000],[1777083473000,171.25000000],[1777083793000,166.50000000],[1777084369000,315.00000000],[1777084689000,297.50000000],[1777085009000,280.00000000],[1777085329000,302.75000000],[1777085649000,295.00000000],[1777085905000,315.50000000],[1777086193000,288.00000000],[1777086482000,312.25000000],[1777086801000,301.33333333],[1777087249000,297.50000000],[1777087377000,228.25000000],[1777087697000,306.00000000],], 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: [[1777068032000,0.00000000],[1777068241000,0.00000000],[1777068497000,0.00000000],[1777068801000,0.00000000],[1777069073000,0.00000000],[1777069397000,0.00000000],[1777069969000,0.00000000],[1777070289000,0.00000000],[1777070689000,0.00000000],[1777070881000,0.00000000],[1777071201000,0.00000000],[1777071649000,0.00000000],[1777071777000,0.00000000],[1777072097000,0.00000000],[1777072609000,0.00000000],[1777072673000,0.00000000],[1777072993000,0.00000000],[1777073569000,0.00000000],[1777073889000,0.00000000],[1777074161000,0.00000000],[1777074481000,0.00000000],[1777074801000,0.00000000],[1777075105000,0.00000000],[1777075377000,0.00000000],[1777075697000,0.00000000],[1777076001000,0.00000000],[1777076273000,0.00000000],[1777076577000,0.00000000],[1777076882000,0.00000000],[1777077152000,0.00000000],[1777077505000,0.00000000],[1777077778000,0.00000000],[1777078081000,0.00000000],[1777078352000,0.00000000],[1777078673000,0.00000000],[1777078977000,0.00000000],[1777079250000,0.00000000],[1777079552000,0.00000000],[1777079873000,0.00000000],[1777080177000,0.00000000],[1777080481000,0.00000000],[1777081009000,0.00000000],[1777081073000,0.00000000],[1777081393000,0.00000000],[1777081681000,0.00000000],[1777082001000,0.00000000],[1777082513000,0.00000000],[1777082577000,0.00000000],[1777082897000,0.00000000],[1777083409000,0.00000000],[1777083473000,0.00000000],[1777083793000,0.00000000],[1777084369000,0.00000000],[1777084689000,0.00000000],[1777085009000,0.00000000],[1777085329000,0.00000000],[1777085649000,0.00000000],[1777085905000,0.00000000],[1777086193000,0.00000000],[1777086482000,0.00000000],[1777086801000,0.00000000],[1777087249000,0.00000000],[1777087377000,0.00000000],[1777087697000,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: [[1777068032000,0.00000000],[1777068241000,0.00000000],[1777068497000,0.00000000],[1777068801000,0.00000000],[1777069073000,0.00000000],[1777069397000,0.00000000],[1777069969000,0.00000000],[1777070289000,0.00000000],[1777070689000,0.00000000],[1777070881000,0.00000000],[1777071201000,0.00000000],[1777071649000,0.00000000],[1777071777000,0.00000000],[1777072097000,0.00000000],[1777072609000,0.00000000],[1777072673000,0.00000000],[1777072993000,0.00000000],[1777073569000,0.00000000],[1777073889000,0.00000000],[1777074161000,0.00000000],[1777074481000,0.00000000],[1777074801000,0.00000000],[1777075105000,0.00000000],[1777075377000,0.00000000],[1777075697000,0.00000000],[1777076001000,0.00000000],[1777076273000,0.00000000],[1777076577000,0.00000000],[1777076882000,0.00000000],[1777077152000,0.00000000],[1777077505000,0.00000000],[1777077778000,0.00000000],[1777078081000,0.00000000],[1777078352000,0.00000000],[1777078673000,0.00000000],[1777078977000,0.00000000],[1777079250000,0.00000000],[1777079552000,0.00000000],[1777079873000,0.00000000],[1777080177000,0.00000000],[1777080481000,0.00000000],[1777081009000,0.00000000],[1777081073000,0.00000000],[1777081393000,0.00000000],[1777081681000,0.00000000],[1777082001000,0.00000000],[1777082513000,0.00000000],[1777082577000,0.00000000],[1777082897000,0.00000000],[1777083409000,0.00000000],[1777083473000,0.00000000],[1777083793000,0.00000000],[1777084369000,0.00000000],[1777084689000,0.00000000],[1777085009000,0.00000000],[1777085329000,0.00000000],[1777085649000,0.00000000],[1777085905000,0.00000000],[1777086193000,0.00000000],[1777086482000,0.00000000],[1777086801000,0.00000000],[1777087249000,0.00000000],[1777087377000,0.00000000],[1777087697000,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: [[1777068032000,0.00000000],[1777068241000,0.00000000],[1777068497000,0.00000000],[1777068801000,0.00000000],[1777069073000,0.00000000],[1777069397000,0.00000000],[1777069969000,0.00000000],[1777070289000,0.00000000],[1777070689000,0.00000000],[1777070881000,0.00000000],[1777071201000,0.00000000],[1777071649000,0.00000000],[1777071777000,0.00000000],[1777072097000,0.00000000],[1777072609000,0.00000000],[1777072673000,0.00000000],[1777072993000,0.00000000],[1777073569000,0.00000000],[1777073889000,0.00000000],[1777074161000,0.00000000],[1777074481000,0.00000000],[1777074801000,0.00000000],[1777075105000,0.00000000],[1777075377000,0.00000000],[1777075697000,0.00000000],[1777076001000,0.00000000],[1777076273000,0.00000000],[1777076577000,0.00000000],[1777076882000,0.00000000],[1777077152000,0.00000000],[1777077505000,0.00000000],[1777077778000,0.00000000],[1777078081000,0.00000000],[1777078352000,0.00000000],[1777078673000,0.00000000],[1777078977000,0.00000000],[1777079250000,0.00000000],[1777079552000,0.00000000],[1777079873000,0.00000000],[1777080177000,0.00000000],[1777080481000,0.00000000],[1777081009000,0.00000000],[1777081073000,0.00000000],[1777081393000,0.00000000],[1777081681000,0.00000000],[1777082001000,0.00000000],[1777082513000,0.00000000],[1777082577000,0.00000000],[1777082897000,0.00000000],[1777083409000,0.00000000],[1777083473000,0.00000000],[1777083793000,0.00000000],[1777084369000,0.00000000],[1777084689000,0.00000000],[1777085009000,0.00000000],[1777085329000,0.00000000],[1777085649000,0.00000000],[1777085905000,0.00000000],[1777086193000,0.00000000],[1777086482000,0.00000000],[1777086801000,0.00000000],[1777087249000,0.00000000],[1777087377000,0.00000000],[1777087697000,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; }