'; 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/wilhelmshaven/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 , 3 , 10 , 0 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 3 , 14 , 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', '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', '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: [ 150.47434310732038 , 182.80157822165683 , 228.6556925500153 , 344.61915686503386 , 330.6766322318515 , 292.18840227234404 , 115.45086084254947 , 107.84883773692852 , 107.84883773692852 , 152.8498526798676 , 182.84679730613567 , 161.57947752815065 , 215.08720153115544 , 147.09573256508574 , 141.26423659638778 , 124.86209745725054 , 128.19675759738323 , 100.05642148347445 , 108.51117421363108 , 164.53499275839468 , 152.3567606657002 , 169.30603938454644 , 178.37926605020195 , 235.8507099942784 , 215.48366373647562 , 204.06794295939721 , 195.80660242860316 , 197.07593083848084 , 166.37232511449778 , 254.520739030076 , 233.6187554847294 , 200.55181524532102 , 159.25355198872796 , 145.20814414333202 , 164.7235174939537 , 132.3694253466387 , 133.30847875762075 , 141.8647026534765 , 134.34151152198535 , 140.78659754016704 , 131.9077386331809 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 110, 175, 114.36259670366633, 136.25, 163.36633663366337, 138.50415512465375, 135.0210970464135, 115, 115, 156.90376569037656, 137.46630727762803, 114.7011308562197, 145.0199203187251, 149.0566037735849, 145.09246088193456, 133.33333333333334, 133.33333333333334, 157.65222772277227, 157.2875157629256, 157.65222772277227, 157.28820933165196, 157.65106435643565, 158.75645892351275, 159.51086153846154, 159.07307692307694, 158.75645892351275, 158.75645892351275, 159.07307692307694, 158.75645892351275, 159.07307692307694, 159.07307692307694, 159.07307692307694, 159.07307692307694, 159.07307692307694, 157.65106435643565, 157.65106435643565, 157.65106435643565, 158.75645892351275, 158.75645892351275, 158.75645892351275, 157.65106435643565 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Wilhelmshaven', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });