'; 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/wangerland/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 = [ 1 , 0 , 1 , 0 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 1 , 1 , 0 , 0 , 3 ]; 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', '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', 'Juni 2024', 'Juli 2024', 'Sept. 2024', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 94.27318012832784 , 198.62970769071765 , 166.71670956703187 , 250.5218160682386 , 250.5218160682386 , 264.32373561242105 , 493.5023449696563 , 554.3992903028065 , 133.79202965505104 , 133.79202965505104 , 202.94752297820924 , 488.77458302678536 , 355.94136589994645 , 384.72196845901675 , 128.00228629596947 , 165.7286108885283 , 149.38370188753734 , 152.15595372464048 , 154.41663207411435 , 181.53576575263605 , 165.98052903635974 , 161.02022888324046 , 165.299740612744 , 181.44574831356184 , 166.2080203086615 , 170.90631566936435 , 167.04501765150653 , 159.5461226850536 , 166.59144403588635 , 164.7437658783555 , 152.54926814545908 , 606.054363509095 , 194.0504289049068 , 766.0483273769278 , 1132.205361273366 , 784.0483273769278 , 916.3236862829702 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 82.11678832116789, 185.4066985645933, 112.46786632390746, 195.09803921568627, 195.09803921568627, 195.09803921568627, 308.3333333333333, 308.3333333333333, 115, 115, 308.3333333333333, 690.9547738693467, 114.7011308562197, 145.0199203187251, 121.88616462346761, 139.53488372093022, 165.302034428795, 158.75645892351275, 166.96478873239437, 166.96478873239437, 166.96478873239437, 177.75757575757575, 179.55555555555554, 183.72413793103448, 179.55555555555554, 179.55555555555554, 179.55555555555554, 179.55555555555554, 183.8549511854951, 179.55555555555554, 179.55555555555554, 310.9452736318408, 183.72413793103448, 1464.9537976109984, 1464.9537976109984, 1464.9537976109984, 1464.9537976109984 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Wangerland', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });