'; 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/suhl/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 , 4 , 0 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 1 , 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', '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', 'Dez. 2024', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 71.989974322852 , 75.85437323919764 , 67.87505461237578 , 73.6547617734592 , 71.4649460774316 , 76.96990057888696 , 67.54858973295237 , 78.65350466966515 , 86.67156726068379 , 86.67156726068379 , 89.48295040197077 , 82.73175793836369 , 75.70150769534779 , 144.7127480233828 , 41.42159402638521 , 50.025322558959516 , 50.11633984241841 , 44.15689368423712 , 44.18720463714575 , 43.30815169112956 , 43.74788814245887 , 44.58801633295721 , 37.82137048485758 , 37.77326334860681 , 41.96347908193497 , 43.858291130685764 , 42.96693230713892 , 53.54588131572816 , 37.75980193039572 , 30.656741680653376 , 46.99348092458018 , 44.988919054974915 , 57.53846713663285 , 46.358595213080186 , 42.941536703781715 , 48.487229977873554 , 67.19361331229514 , 62.75851924647886 , 71.36994095755105 , 82.82932287108103 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 27.669270833333332, 40.12671594508976, 33.333333333333336, 40.55619930475087, 40.55619930475087, 41.13345521023766, 40.55619930475087, 45.248868778280546, 51.25, 51.25, 47.51131221719457, 44.510385756676556, 44.510385756676556, 45, 41.106128550074736, 42.10526315789474, 42.10526315789474, 41.106128550074736, 42.10526315789474, 42.10526315789474, 42.10526315789474, 45.45454545454545, 38.71351995235259, 38.71351995235259, 41.13345521023766, 45.248868778280546, 42.10526315789474, 47.51131221719457, 45.45454545454545, 38.71351995235259, 45.45454545454545, 45.45454545454545, 51.25, 52.94117647058823, 38.71351995235259, 45.45454545454545, 69.23076923076923, 69.23076923076923, 69.23076923076923, 91.86351706036746 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Suhl', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });