'; 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/reinstorf/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 , 1 , 9 , 5 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 2 , 3 , 4 , 5 , 5 ]; 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', 'Apr. 2023', 'Mai 2023', 'Juni 2023', 'Juli 2023', 'Aug. 2023', 'Sept. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 2024', 'Sept. 2024', 'Okt. 2024', 'Nov. 2024', 'Dez. 2024', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 219.82118106963034 , 230.35328927426434 , 294.5860870853388 , 332.94664021808285 , 332.94664021808285 , 327.48585550069396 , 307.7744092955776 , 344.237156856152 , 379.13742075834074 , 385.42036266196646 , 385.42036266196646 , 350.6213331908041 , 373.5096605902124 , 348.9507973062716 , 337.78715633076376 , 353.7839195901851 , 335.29532985994683 , 311.95542724549443 , 326.5917850060497 , 333.198378670857 , 339.89428042726286 , 344.92460175391597 , 356.6420698247418 , 359.18939180108833 , 323.9407391043011 , 313.91437317740497 , 317.1380977325848 , 315.3467952142796 , 327.2589465082164 , 282.8564760134961 , 306.0970752751545 , 338.6987540117697 , 316.45035569275444 , 340.97814195286657 , 302.75472919636036 , 283.30223143916834 , 295.3695785033513 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 122.15384615384616, 100, 105, 232.66666666666666, 232.66666666666666, 286.0035211267606, 280, 286.0035211267606, 419.47926711668276, 397.22222222222223, 397.22222222222223, 249.500998003992, 255.625, 285, 325.1445086705202, 312.72727272727275, 296.69097027481774, 268.6483454851374, 278.4184514003295, 323.60097323600974, 323.60097323600974, 382.3279524214104, 382.3279524214104, 405.62074460379546, 317.5895765472313, 334.64955577492594, 334.64955577492594, 355.01193317422434, 355.01193317422434, 324.77788746298125, 324.77788746298125, 364.11149825783974, 328.06092560046864, 350.18382352941177, 328.06092560046864, 318.3023872679045, 318.3023872679045 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Reinstorf', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });