'; let req = new XMLHttpRequest(); req.onreadystatechange = function () { if (req.readyState === 4 && req.status === 200) { let result = JSON.parse(req.response); document.getElementById("landprices").innerHTML = result.data; buildCharts(result.charts.areaChartData, result.charts.qmPriceChartData); loading = false; } else if (req.readyState === 4) { loading = false; } }; const url = "/stadt/floersheim/aggregation?year=" + val[1] + "&month=" + val[0]; req.open('GET', url, true); setTimeout(function () { req.send(); }, 1200); } }) } const areaChartData = { labels: [], data: [] }; const qmPriceChartData = { labels: [], data: [] }; areaChartData.labels = [ "0 m² - 100 m²" , "100 m² - 500 m²" , "500 m² - 1000 m²" , "1000 m² - 2000 m²" , "2000 m²+" ]; areaChartData.data = [ 0 , 12 , 20 , 12 , 8 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 9 , 2 , 0 , 0 , 41 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Apr. 2021', 'Aug. 2021', 'Nov. 2021', 'Dez. 2021', 'Jan. 2022', 'Feb. 2022', 'März 2022', 'Apr. 2022', 'Mai 2022', 'Juni 2022', 'Juli 2022', 'Aug. 2022', 'Sept. 2022', 'Okt. 2022', 'Nov. 2022', 'Dez. 2022', 'Jan. 2023', 'Feb. 2023', 'März 2023' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 1040.7628863142284 , 1216.9789609404838 , 1041.6738725203604 , 911.6053360310096 , 899.2590774223729 , 1077.305572043906 , 946.0675080126864 , 898.7860955467365 , 1048.8950018596422 , 972.1473592350228 , 972.1473592350228 , 1069.6758488049961 , 1061.7310654354374 , 1120.7614248599452 , 1133.5628441078488 , 1249.2536369736492 , 1368.4890015063784 , 1151.8903501416942 , 970.2246786350964 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 1158.3333333333333, 1158.3333333333333, 843.5374149659864, 940.4388714733542, 881.9018404907976, 1158.3333333333333, 881.9018404907976, 968.6567164179105, 1158.3333333333333, 1080.2469135802469, 1080.2469135802469, 1120.6896551724137, 1158.3333333333333, 1178.318931657502, 1120.6896551724137, 1220.408163265306, 1236.2637362637363, 1017.4418604651163, 1004.746835443038 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Flörsheim', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });