'; 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/niederschoeneweide/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 , 4 , 0 , 0 , 2 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 0 , 0 , 0 , 6 ]; 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', 'Mai 2022', 'Juni 2022', 'Juli 2022', 'Aug. 2022', 'Sept. 2022', 'Okt. 2022', 'Nov. 2022', 'Dez. 2022', 'Jan. 2023', 'Feb. 2023', 'März 2023', 'Juli 2023', 'Sept. 2023', 'Dez. 2024', 'Jan. 2025', 'Feb. 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 767.1384366379393 , 679.862468339371 , 709.954403263289 , 777.5795943680753 , 768.1882926925198 , 755.4659918343727 , 836.9123551595025 , 796.8845643344501 , 796.8845643344501 , 781.1149632877821 , 768.0823151385168 , 757.3515650260674 , 738.3392621684534 , 687.9010739034233 , 710.8816787038978 , 675.8052582549294 , 671.7012089501192 , 4168.600368324125 , 2985.2670349907917 , 2253.532478930574 , 2253.532478930574 , 2002.2969289035038 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 614.8148148148148, 606.4356435643564, 627.6729559748428, 666.6666666666666, 666.6666666666666, 658.307210031348, 788.5964912280701, 673.9130434782609, 673.9130434782609, 665.5555555555555, 777.7777777777778, 750, 665.4761904761905, 655.241935483871, 655.241935483871, 633.8028169014085, 623.75, 7916.666666666667, 4958.333333333333, 3329.1666666666665, 3329.1666666666665, 1669.889502762431 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Niederschöneweide', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });