'; 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/lueder/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 , 0 , 3 , 2 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 7 , 1 , 0 , 0 , 0 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Apr. 2021', 'Aug. 2021', 'Nov. 2021', 'Dez. 2021', 'Jan. 2022', 'März 2022', 'Mai 2022', 'Juni 2022', 'Juli 2022', 'Aug. 2022', 'Sept. 2022', 'Okt. 2022', 'Nov. 2022', 'Dez. 2022', 'Jan. 2023', 'Feb. 2023', 'März 2023', 'Nov. 2024', 'Dez. 2024', 'Feb. 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 83.77092085320736 , 66.94186565832644 , 26.70807249696743 , 31.529748128586828 , 31.529748128586828 , 53.69355196440519 , 169.1463119498235 , 119.89978748542636 , 119.89978748542636 , 198.12891033420885 , 156.25912609767013 , 129.49477735958646 , 110.20538773864354 , 66.54826194163152 , 112.53535894159486 , 130.61861024209006 , 89.79896270375328 , 40.33724526138871 , 53.78241035574098 , 57.7574994832959 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 84.61538461538461, 50, 28.968713789107763, 34.113060428849906, 34.113060428849906, 84.61538461538461, 138.00424628450105, 84.61538461538461, 84.61538461538461, 204.77815699658703, 90.02590673575129, 90.02590673575129, 88.5558583106267, 67.2182006204757, 88.5558583106267, 138.00424628450105, 90.02590673575129, 41.1764705882353, 44.582392776523704, 59.800664451827245 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Lüder', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });