'; 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/goettingen/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 , 9 , 6 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 1 , 15 , 2 , 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', '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', 'März 2024', 'Apr. 2024', 'Mai 2024', 'Juni 2024', 'Juli 2024', 'Sept. 2024', 'Nov. 2024', 'Dez. 2024', 'Jan. 2025', 'Feb. 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 76.06889450133374 , 66.94066377966546 , 103.45449148938414 , 107.6605386684623 , 107.6605386684623 , 112.5973718009393 , 97.93144350286731 , 123.72031435901779 , 196.84272812137553 , 196.84272812137553 , 162.88492039383786 , 161.20841814780454 , 170.86814756753301 , 158.53531842978566 , 102.41607195621121 , 78.49023454180913 , 77.5066189123843 , 66.68120840750078 , 164.99476253766625 , 158.12004446038972 , 179.90164631651686 , 150.86482953332236 , 169.31574325511983 , 172.3081084736593 , 174.5720760608514 , 164.65960268012762 , 178.79209306421652 , 183.66720890028705 , 141.271211185284 , 141.9016319688954 , 623.8932578121335 , 474.5538077208776 , 300.99720121383916 , 186.80579430193114 , 198.41298244286463 , 204.06497324702895 , 615.5548558413888 , 150.65001859086016 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 99, 31.987179487179485, 15.254237288135593, 42.5531914893617, 42.5531914893617, 42.5531914893617, 47.514619883040936, 80, 110, 110, 87.30533270410571, 97.27626459143968, 110, 110, 95.83707696915243, 85, 85, 85, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 128.0944156591825, 128.0944156591825, 703.8123167155425, 497.98792756539234, 254.23728813559322, 150, 164.97764530551416, 164.97764530551416, 1282.051282051282, 150 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Göttingen', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });