'; 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/eitorf/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 , 13 , 3 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 3 , 6 , 5 , 4 , 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', 'Juni 2024', 'Juli 2024', 'Aug. 2024', 'Sept. 2024', 'Okt. 2024', 'Nov. 2024', 'Dez. 2024', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 83.75963722349681 , 148.1666799866034 , 176.87325835241123 , 141.81488702526374 , 150.36852658089654 , 153.20187861258958 , 156.963459518589 , 151.7698717238935 , 171.5857208959562 , 241.41197970263335 , 241.41197970263335 , 211.44923188437883 , 223.0167556627683 , 212.42113748719828 , 220.95761329842733 , 223.047616953415 , 178.58049778607878 , 198.89423119489555 , 199.34914163961292 , 275.89062672379146 , 261.7702053343592 , 220.35460971173347 , 161.08388821885245 , 137.39387552615025 , 103.21781458794764 , 157.38862963754104 , 139.10082412282026 , 200.46359325985216 , 179.32610061422974 , 173.01212770131917 , 225.5719984545641 , 438.99467945970395 , 124.54407173751761 , 101.42151065718906 , 132.5232819878668 , 260.9593197995694 , 213.41984102712885 , 251.8697620851653 , 210.30113816083616 , 233.43217463825775 , 208.93599664165347 , 219.82858922931078 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 63.492063492063494, 63.492063492063494, 74.89905787348587, 98.82108183079058, 90.39145907473309, 100, 86.46288209606988, 86.48648648648648, 86.48648648648648, 160.24036054081122, 160.24036054081122, 156.17977528089887, 171.42857142857142, 171.37307919340407, 166.66666666666666, 170.89452603471295, 141.54281670205236, 146.69926650366747, 142.09591474245116, 178.4582893347413, 186.9918699186992, 158.88778550148956, 128.2051282051282, 124.33392539964476, 69.5780903034789, 142.18009478672985, 124.33392539964476, 181.75182481751824, 150, 144.23076923076923, 228.2453637660485, 300, 133.96889111891622, 116.13936724068883, 166.37478108581436, 231.18279569892474, 231.18279569892474, 231.18279569892474, 196.35036496350364, 241.40127388535032, 193.26683291770573, 227.14285714285714 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Eitorf', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });