var windv = document.getElementById('windc').getContext('2d'); var windkmh = document.getElementById('windkmh').getContext('2d'); var windms = document.getElementById('windms').getContext('2d'); var windknp = document.getElementById('windknp').getContext('2d'); var luchtdruk = document.getElementById('luchtdruk').getContext('2d'); var temperatuur = document.getElementById('temperatuur').getContext('2d'); var wolken = document.getElementById('bewolking').getContext('2d'); var mwolken = document.getElementById('mbewolking').getContext('2d'); var hwolken = document.getElementById('hbewolking').getContext('2d'); var neerslag = document.getElementById('neerslag').getContext('2d'); var straling = document.getElementById('straling').getContext('2d'); var zicht = document.getElementById('zicht').getContext('2d'); // $("#windr").html("test"); document.getElementById("windr").innerHTML=""; var gradient = windv.createLinearGradient(0, 0, 0, 400); gradient.addColorStop(0, 'rgba(0,111,174,0.8)'); gradient.addColorStop(1, 'rgba(21,31,38,0.5)'); var windChart = new Chart(windv, { type: 'line', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'wind', data: [3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,3,3], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 1, max: 6, callback: function(label, index, labels) { return label+' bft'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' bft'; } } }, } }); var windknpChart = new Chart(windknp, { type: 'line', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'wind', data: [8,8,8,8,8,8,8,8,8,8,10,10,10,10,12,14,14,14,14,12,12,12,12,12,10,8], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 1, max: 16, callback: function(label, index, labels) { return label+' knp'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' knp'; } } }, } }); var windkmhChart = new Chart(windkmh, { type: 'line', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'wind', data: [14.4,14.4,14.4,14.4,14.4,14.4,14.4,14.4,14.4,14.4,18,18,18,18,21.6,25.2,25.2,25.2,25.2,21.6,21.6,21.6,21.6,21.6,18,14.4], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 1, max: 27.2, callback: function(label, index, labels) { return label+' km/h'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' km/h'; } } }, } }); var windmsChart = new Chart(windms, { type: 'line', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'wind', data: [4,4,4,4,4,4,4,4,4,4,5,5,5,5,6,7,7,7,7,6,6,6,6,6,5,4], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 1, max: 9, callback: function(label, index, labels) { return label+' m/s'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' m/s'; } } }, } }); var luchtdChart = new Chart(luchtdruk, { type: 'line', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'luchtdruk', data: [1006,1005.6,1005.4,1005.3,1005.2,1005,1004.8,1004.5,1004.3,1004,1003.7,1003.4,1003.2,1003.1,1003,1002.8,1002.6,1002.4,1002.2,1002,1001.8,1001.6,1001.4,1001.2,1000.9,1000.7], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 996, max: 1011, callback: function(label, index, labels) { return label+' hPa'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' hPa'; } } }, } }); var tempChart = new Chart(temperatuur, { type: 'line', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'temperatuur', data: [22,23,22,21,20,19,18,17,16,16,16,16,15,15,16,17,18,19,20,21,22,23,24,24,24,24], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 14, max: 26, callback: function(label, index, labels) { return label+' ºC'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' ºC'; } } }, } }); var wolkenChart = new Chart(wolken, { type: 'bar', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'wolken', data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: true, callback: function(label, index, labels) { return label+' %'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' %'; } } }, } }); var mwolkenChart = new Chart(mwolken, { type: 'bar', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'wolken', data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: true, callback: function(label, index, labels) { return label+' %'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' %'; } } }, } }); var hwolkenChart = new Chart(hwolken, { type: 'bar', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'wolken', data: [100,0,0,0,58,42,15,97,95,94,97,75,95,35,21,58,31,0,4,11,9,9,5,0,0,0], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: true, callback: function(label, index, labels) { return label+' %'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' %'; } } }, } }); var neerslagChart = new Chart(neerslag, { type: 'bar', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'neerslag', data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 0, max: 2, callback: function(label, index, labels) { return label+' mm'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' mm'; } } }, } }); var stralingChart = new Chart(straling, { type: 'bar', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'Global radiation', data: [134,99,58,16,0,0,0,0,0,0,0,0,0,12,55,108,161,210,248,271,280,270,248,212,165,112], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 0, max: 285, callback: function(label, index, labels) { return label+' W/m2'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' W/m2'; } } }, } }); var zichtChart = new Chart(zicht, { type: 'line', data: { labels: ["17","18","19","20","21","22","23","00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"], datasets: [{ label: 'zicht', data: [50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000,50000], backgroundColor: gradient, borderColor: gradient, borderWidth: 1 }] }, options: { legend: { display: false }, scales: { yAxes: [{ ticks: { beginAtZero: false, min: 0, max: 55000, callback: function(label, index, labels) { return label+' m'; } } }] }, tooltips: { enabled: true, mode: 'single', callbacks: { title: function(tooltipItems, data) { return tooltipItems[0].xLabel + ' uur'; }, label: function(tooltipItems, data) { return tooltipItems.yLabel + ' m'; } } }, } });