'; 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/teisendorf/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 , 3 , 6 , 3 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 1 , 0 , 0 , 0 , 14 ]; 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', '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', 'März 2024', 'Juni 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: [ 357.0272254024271 , 422.3253966711557 , 124.50743038535147 , 76.42385749824966 , 76.42385749824966 , 319.5240623711116 , 942.2518851732843 , 598.8914078860255 , 598.8914078860255 , 735.7751939512182 , 564.5741227934784 , 611.7014908502903 , 623.9698896119806 , 550.9378061243323 , 437.81903875888236 , 498.2162969970022 , 485.84592790675333 , 594.0813248431699 , 563.4157487811744 , 722.2083462928999 , 632.1679603426134 , 789.7667720816984 , 643.9756205607438 , 701.8997366468764 , 767.788598512022 , 862.0625754344378 , 711.809292380323 , 482.60138023479885 , 583.4137943814524 , 379.26010041275623 , 499.98775215555173 , 487.45091383886063 , 551.0961278431535 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 300.6134969325153, 528.3251231527094, 8.036904518503373, 8.036904518503373, 8.036904518503373, 500, 1289.767841788478, 648.1481481481482, 648.1481481481482, 708, 502.91545189504376, 674.5562130177515, 646.2984723854289, 638.4, 528.4090909090909, 541.5754923413567, 525.8964143426294, 632.9113924050633, 632.9113924050633, 966.0194174757281, 612.2448979591836, 685.7142857142857, 685.7142857142857, 664.8575305291723, 685.7142857142857, 720.7207207207207, 720.0772200772201, 572.7675084613381, 572.7675084613381, 533.3333333333334, 600, 572.7675084613381, 582.03125 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Teisendorf', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });