'; 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/roden/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 , 0 , 0 , 5 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 5 , 0 , 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', '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', 'Juni 2023', 'Juli 2023', 'Aug. 2023', 'Sept. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 2024', 'Mai 2024', 'Sept. 2024', 'Dez. 2024', 'Feb. 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 85.09688429269134 , 74.4527437516791 , 80.59105017920466 , 124.35321534743329 , 123.32521937467163 , 92.49007775016192 , 89.56151169353869 , 119.69681726916664 , 76.14653238263101 , 76.14653238263101 , 111.69470686362479 , 104.77899727144862 , 101.17674833187624 , 152.31735118955825 , 139.1534840582261 , 145.4076559998121 , 123.3180361973943 , 95.97618511940176 , 94.02735475910183 , 111.75915552538534 , 109.7579422429505 , 100.05039749463646 , 114.46561753812311 , 119.13864767796035 , 100.05039749463646 , 77.29250230472748 , 109.7579422429505 , 90.37653907773345 , 99.35597487881633 , 1.3580528205546463 , 1.326803341875225 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 72.34726688102894, 70.3883495145631, 89.67391304347827, 110.95505617977528, 100, 100, 110.63829787234043, 100, 90, 90, 122.46621621621621, 100, 85.0011591067151, 141.42857142857142, 130.5785123966942, 122.46621621621621, 126.67660208643815, 90, 122.46621621621621, 150.0912408759124, 138.68613138686132, 121.95121951219512, 138.68613138686132, 138.68613138686132, 121.95121951219512, 83.61486486486487, 138.68613138686132, 100.42126379137412, 93.7062937062937, 1.651092809629395, 1.651092809629395 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Roden', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });