'; 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/bad-zwischenahn/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 , 5 , 1 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 1 , 0 , 3 , 1 , 2 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Aug. 2021', 'Nov. 2021', 'Dez. 2021', 'Dez. 2022', 'März 2023', 'Apr. 2023', 'Mai 2023', 'Juni 2023', 'Juli 2023', 'Aug. 2023', 'Sept. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Mai 2024', 'Juni 2024', 'Juli 2024', 'Aug. 2024', 'Sept. 2024', 'Okt. 2024', 'Nov. 2024', 'Dez. 2024', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 230.044145173756 , 258.5315408479835 , 328.33333333333337 , 287.38185108172934 , 187.14799029724767 , 180.1341610503739 , 195.0870383645238 , 209.34466595367022 , 229.1410338958 , 275.026480819922 , 387.7506353198628 , 360.3383466051234 , 426.0054861510234 , 352.66246638409524 , 229.90694541808477 , 173.95143683922362 , 254.47554119326605 , 341.9335158987066 , 396.4410687022069 , 408.0882326005401 , 466.17455442641335 , 444.3705290656529 , 367.6266295421522 , 334.10804388800915 , 382.5096549797722 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 510.879848628193, 0 , 0 , 337.38191632928476, 155, 155, 178.27756445419638, 178.27756445419638, 180, 218.69244935543279, 330, 330, 353.1746031746032, 303.8674033149171, 229.16666666666666, 218.24817518248176, 220.03058103975536, 251.6309412861137, 378.94736842105266, 378.94736842105266, 429.4940796555436, 757.5757575757576, 338.2663847780127, 276.5237020316027, 338.2663847780127 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Bad Zwischenahn', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });