'; 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/wutha-farnroda/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 , 2 , 7 , 3 , 5 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 7 , 6 , 3 , 1 , 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', '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', '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: [ 72.20849406923305 , 57.24247110669618 , 47.12674485926919 , 61.54041885930844 , 65.26013946250306 , 88.96269483380779 , 70.48854185631444 , 48.35471875638836 , 83.05466305235673 , 82.27311987085226 , 82.27311987085226 , 89.94897735565165 , 87.02310396250152 , 90.6204554196702 , 97.32272625295064 , 56.16103363370875 , 64.54880105567042 , 83.5058483063459 , 67.44749004832282 , 64.30689374416983 , 54.59843687232339 , 63.72709751990894 , 67.9013576952105 , 55.52499906720998 , 54.836203549002704 , 74.71283993803388 , 54.21882206933494 , 76.36367581559708 , 52.58046539523748 , 50.83346371600074 , 53.954128272269124 , 40.51361238230054 , 24.485234571978125 , 113.2823109904314 , 110.5740475529479 , 122.4450088920115 , 142.31237916646168 , 142.31237916646168 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 60, 40, 38.498556304138596, 53.90334572490706, 54.54545454545455, 58.8235294117647, 54.54545454545455, 37.5, 54.54545454545455, 54.54545454545455, 54.54545454545455, 51.19453924914676, 54.54545454545455, 54.54545454545455, 61.29597197898424, 48.24561403508772, 48.24561403508772, 61.29597197898424, 50, 41.00946372239748, 41.00946372239748, 44.333333333333336, 52.75974025974026, 41.00946372239748, 41.00946372239748, 52.75974025974026, 41.00946372239748, 42.666666666666664, 40.737148399612025, 40.737148399612025, 41.00946372239748, 40.737148399612025, 24.979149291075895, 108.66574965612105, 84.78260869565217, 140, 155.5636896046852, 155.5636896046852 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Wutha-Farnroda', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });