'; 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/sande/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 , 0 , 0 , 5 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 5 , 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', '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', 'Aug. 2023', 'Sept. 2023', 'Okt. 2023', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 117.03890452853102 , 172.34794245097714 , 158.160557107973 , 215.075686843131 , 203.69390013537824 , 227.79858333097056 , 224.3445647157509 , 311.7729874098354 , 368.60875771136506 , 134.70457705559704 , 134.70457705559704 , 163.93615800725735 , 315.3394364802745 , 237.0376589185429 , 260.80078034507136 , 138.43933729815282 , 138.59930638625175 , 142.72316764419122 , 144.47151156706036 , 55.71287678863532 , 71.16604611175931 , 60.73338069012711 , 158.47195029140514 , 157.34249153015926 , 157.34249153015926 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 88.98250728862973, 170.49408489909533, 112.46786632390746, 89.87603305785125, 89.87603305785125, 112.46786632390746, 296.8646864686469, 135.0210970464135, 135.0210970464135, 115, 115, 160.2325581395349, 198.67549668874173, 160, 145.09246088193456, 140, 140, 144.28323699421966, 157.28820933165196, 72.61410788381743, 72.61410788381743, 72.61410788381743, 190.3114186851211, 193.83697813121273, 193.83697813121273 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Sande', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });