'; 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/salgen/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 , 0 , 0 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 0 , 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', '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', 'Juli 2023', 'Aug. 2023', 'Sept. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 2024', 'Mai 2024', 'Juni 2024', 'Aug. 2024', 'Sept. 2024', 'Okt. 2024', 'Feb. 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 392.277812023728 , 236.553996514553 , 71.67685036644478 , 124.98467996200594 , 117.84152110681482 , 754.0739865018993 , 858.1542227136476 , 858.1965728082289 , 288.54501102744945 , 377.1529096272708 , 377.1529096272708 , 336.73278523543945 , 314.3204213688213 , 322.8127306843622 , 450.50781010006966 , 406.07254077459817 , 366.89712639497895 , 398.2230101194289 , 445.418559300078 , 368.8254183627318 , 324.6292923853963 , 474.70567050471124 , 385.4402884909797 , 320.40305783762267 , 305.70578133788 , 323.1000524526688 , 240.669535143397 , 336.65313206411 , 310.11435691579004 , 341.11959401822935 , 266.3905432408909 , 240.43615245357802 , 258.7568591221009 , 59.588563786661325 , 43.22608776609028 , 3.9727582292849033 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 236.67462211614955, 99.84183471727955, 5.857520854794078, 53.456591639871384, 53.456591639871384, 338.2352941176471, 338.2352941176471, 375.4266211604096, 289.51612903225805, 289.51612903225805, 289.51612903225805, 303.08941605839414, 303.08941605839414, 303.0895061728395, 480.04123844196016, 395, 379.54545454545456, 379.97724687144483, 391.6666666666667, 394.2786069651741, 391.6666666666667, 531.1443746982134, 531.1443746982134, 394.2786069651741, 391.6666666666667, 458.7155963302752, 226.7660401814647, 458.7155963302752, 410.4297440849831, 410.4297440849831, 410.4297440849831, 243.24324324324326, 243.24324324324326, 40, 40, 3.9727582292849033 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Salgen', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });