'; 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/luetetsburg/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 , 1 , 8 , 3 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 8 , 4 , 0 , 0 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Apr. 2021', 'Aug. 2021', 'Nov. 2021', 'Dez. 2021', 'Juni 2022', 'Juli 2022', 'Aug. 2022', 'Sept. 2022', 'Okt. 2022', 'Nov. 2022', 'Dez. 2022', 'Jan. 2023', 'Feb. 2023', 'März 2023', 'Juli 2023', 'Aug. 2023', 'Sept. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 2024', 'Juni 2024', 'Juli 2024', 'Sept. 2024', 'Nov. 2024', 'Dez. 2024', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 140.7058360522555 , 144.34665128842045 , 242.7274594080714 , 232.4698196817492 , 91.52514703483655 , 91.52514703483655 , 91.1143333514392 , 89.15370816201346 , 106.3593090608867 , 107.57353698360218 , 73.68420564787637 , 99.80746663373053 , 110.60809554606485 , 133.61166972127796 , 188.84741187625468 , 196.64298570349501 , 194.25414269078377 , 130.66864357298655 , 123.87628886893268 , 132.21688976674133 , 128.77638474523675 , 114.53970477778263 , 121.55698218811729 , 126.12579086561433 , 104.97334992682241 , 147.2481906698268 , 138.01691730126046 , 148.81404552131607 , 121.34898929413394 , 133.92586769711477 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 161.29032258064515, 161.29032258064515, 263.4032634032634, 0 , 124.17135761589404, 124.17135761589404, 104.83870967741936, 124.17135761589404, 124.17135761589404, 120.36108324974924, 88.75739644970415, 120.36108324974924, 128.2051282051282, 133, 178.40095465393796, 253.84615384615384, 218.4065934065934, 139, 137.9746835443038, 150.50251256281408, 150.50251256281408, 139, 139, 148.33333333333334, 119.49760765550239, 150.50251256281408, 129, 150.50251256281408, 150.50251256281408, 164.45182724252493 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Lütetsburg', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });