'; 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/bremerhaven/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 , 5 , 16 , 1 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 9 , 10 , 5 , 2 ]; 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', '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: [ 193.77884469313722 , 147.3974565002795 , 276.8584136213374 , 301.9182565871836 , 315.8247484580574 , 264.4762989942603 , 250.4337898441158 , 246.6205141327352 , 266.98699131409325 , 250.16095292840006 , 250.16095292840006 , 333.2715514381175 , 303.9001604058451 , 335.8648348953852 , 321.4275744703428 , 324.2814273641847 , 294.91195849642156 , 294.4369280515471 , 298.43518210489134 , 323.4532035920904 , 328.77119352596554 , 282.84823292456133 , 275.71472523934216 , 300.0577630546903 , 299.56184002257714 , 264.47109575682714 , 330.32841502499014 , 351.76330423593333 , 381.4354937057014 , 242.64791976588222 , 287.6973581479241 , 327.93397021433026 , 246.2515233694858 , 254.6472184127248 , 208.9886942860957 , 246.94899503469944 , 283.0828705920793 , 245.3266998127753 , 276.65544681344784 , 253.64658596969548 , 289.9550015573454 , 252.88516272489554 , 271.3149724853099 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 230, 74.8502994011976, 250, 262.6811594202899, 250, 254.36046511627907, 254.36046511627907, 183.13953488372093, 183.13953488372093, 183.13953488372093, 183.13953488372093, 254.36046511627907, 244.78178368121442, 254.36046511627907, 244.78178368121442, 270, 270, 270, 270, 270, 270, 254.36046511627907, 254.36046511627907, 270, 270, 270, 225.37878787878788, 297.790585975024, 297.790585975024, 297.790585975024, 181.8848167539267, 221.6216216216216, 297.790585975024, 224.52830188679246, 225.80645161290323, 297.790585975024, 212.61261261261262, 297.790585975024, 259.7864768683274, 258.4053794428434, 259.7864768683274, 255.06937033084313, 255.06937033084313 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Bremerhaven', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });