'; 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/wiesbaden/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 , 2 , 16 , 13 , 4 ]; 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 , 35 ]; 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', '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', 'Feb. 2024', 'März 2024', 'Apr. 2024', '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: [ 930.7108263420912 , 1033.5752740170794 , 946.1378943207261 , 903.1392289706788 , 938.9129601429041 , 1004.4126414622731 , 1016.8137626858386 , 1285.0659122831753 , 1122.9860567798698 , 1122.9860567798698 , 1119.748247456833 , 1011.1346346281027 , 1119.2303592145233 , 1135.2814725572432 , 1123.4031274629583 , 1053.783258112183 , 1016.8877137105953 , 940.0308198309543 , 1151.6437849734045 , 1168.687758950357 , 1190.6302159523789 , 1195.9879882155578 , 1331.655058462443 , 1271.22769715437 , 1293.297331130932 , 1383.1520623870947 , 1386.5340517390912 , 1089.874514207727 , 1209.283392996158 , 1173.0078204332717 , 1107.1705004395164 , 1133.9518208894106 , 1148.5833318570303 , 1161.2270241690421 , 1237.0139016375958 , 1149.4559106063398 , 1158.2726381699779 , 1123.2593899420146 , 1195.4777671274394 , 1099.5909078299396 , 1301.7885418715925 , 1185.5450922208965 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 1120.6896551724137, 927.0386266094421, 590.1639344262295, 843.5374149659864, 843.5374149659864, 954.5454545454545, 954.5454545454545, 1245, 1080.2469135802469, 1080.2469135802469, 1004.746835443038, 1001.2836970474968, 1080.2469135802469, 1083.1511963018124, 1076.0719225449516, 990, 1004.746835443038, 990, 1107.561929595828, 1233.3965844402278, 1212.6436781609195, 1154.5893719806763, 1243.2432432432433, 1100, 1233.3965844402278, 1196.9904240766075, 1320.8718626155878, 1084.5839017735334, 1333.3333333333333, 1227.2727272727273, 1227.2727272727273, 1258.5119798234552, 1196.9178082191781, 1258.5119798234552, 1265.8763759525825, 1200, 1265.8763759525825, 1265.8763759525825, 1265.8763759525825, 1200, 1296.6887417218543, 1200 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Wiesbaden', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });