'; 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/schopp/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 , 14 , 4 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 9 , 5 , 5 , 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', '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', 'Aug. 2024', 'Sept. 2024', 'Okt. 2024', 'Nov. 2024', 'Dez. 2024', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 83.25907248533696 , 79.66873396118152 , 81.85329309025943 , 81.66826845174384 , 79.15088937962369 , 93.6238279026437 , 93.00944926526896 , 90.57766647727678 , 98.96866185079328 , 134.12412102767996 , 134.12412102767996 , 119.34835024882214 , 119.68707490125354 , 146.2421902308048 , 152.22341859098168 , 152.9643231388044 , 119.45311920630034 , 131.0585690445807 , 124.15299638843919 , 134.7134847273358 , 127.5650675008225 , 129.15250729897843 , 136.8420253266823 , 133.3131015169524 , 136.80075170858774 , 147.27840735737792 , 157.92063831048142 , 152.329965520759 , 154.77405703663274 , 217.71353041939926 , 200.14109337304876 , 100.95263114061441 , 145.6819821217772 , 174.5966597713563 , 130.71325388512918 , 115.52951333903306 , 118.77804271095663 , 130.2576022242479 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 83.58662613981762, 78, 69.41649899396378, 83.58662613981762, 83.58662613981762, 86.87943262411348, 83.58662613981762, 65.83969465648855, 76.28294036061027, 100, 100, 91.1854103343465, 86.56036446469248, 102.9252437703142, 114.28571428571429, 118.18181818181819, 102.9252437703142, 105.3763440860215, 96.33911368015414, 135, 135, 129.41176470588235, 135, 135, 135, 131.18279569892474, 135, 131.18279569892474, 145.34883720930233, 228.92819979188346, 228.92819979188346, 83.80681818181819, 110.23622047244095, 155.70934256055364, 110.23622047244095, 83.80681818181819, 87.79761904761905, 110.29411764705883 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Schopp', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });