'; 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/schmoeckwitz/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 , 12 , 3 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 0 , 3 , 4 , 10 ]; 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', 'Mai 2022', 'Juni 2022', 'Juli 2022', 'Aug. 2022', 'Sept. 2022', 'Okt. 2022', 'Nov. 2022', 'Dez. 2022', 'Jan. 2023', 'Feb. 2023', 'März 2023', 'Juni 2023', 'Juli 2023', 'Sept. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'Feb. 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: [ 767.1384366379393 , 671.9445908036588 , 709.954403263289 , 777.5795943680753 , 768.1882926925198 , 755.4659918343727 , 861.3281051447575 , 842.8552617618255 , 796.8845643344501 , 796.8845643344501 , 781.1149632877821 , 768.0823151385168 , 768.1546025768926 , 738.3392621684534 , 687.9010739034233 , 710.8816787038978 , 675.8052582549294 , 671.7012089501192 , 585.5239719025443 , 717.414014178222 , 516.3336856769303 , 509.84591095571454 , 499.82139349869135 , 509.5896670902513 , 488.87002053400784 , 480.6572379629414 , 471.3182121458211 , 412.4914344116263 , 479.4104342291966 , 404.3321026781573 , 434.93129944411555 , 462.32972365550205 , 449.453478446734 , 391.87788599798927 , 348.9838915960134 , 377.1953915063584 , 472.69062834931117 , 481.5033784035587 , 490.2336363657657 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 614.8148148148148, 606.4356435643564, 627.6729559748428, 666.6666666666666, 666.6666666666666, 658.307210031348, 775, 788.5964912280701, 673.9130434782609, 673.9130434782609, 665.5555555555555, 777.7777777777778, 750, 665.4761904761905, 655.241935483871, 655.241935483871, 633.8028169014085, 623.75, 593.3117583603021, 665.1017214397496, 602.5039123630673, 505.64516129032256, 505.64516129032256, 487.32394366197184, 469.537037037037, 374.1496598639456, 481.6666666666667, 452.72727272727275, 329.0400572246066, 329.0400572246066, 329.0400572246066, 436.68122270742356, 436.68122270742356, 436.68122270742356, 321.9047619047619, 370.6034482758621, 436.68122270742356, 418.5022026431718, 418.5022026431718 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Schmöckwitz', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });