'; 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/saarlouis/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 , 6 , 10 , 6 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 12 , 0 , 3 , 7 ]; 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', 'Sept. 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: [ 98.96111970824302 , 132.00238878235473 , 183.4735653776297 , 226.582291096603 , 204.5701775289977 , 249.0790603819017 , 188.8907183835025 , 173.1855100266669 , 192.73137732549714 , 212.17271665849472 , 212.17271665849472 , 181.19267223677258 , 190.64429271074266 , 189.55862898640737 , 144.00970757383286 , 127.12379886154811 , 90.21066393797183 , 97.88970285857978 , 141.3119232867336 , 195.25726631959964 , 178.44616086360713 , 154.8654195390455 , 179.2200030888586 , 178.50678664848448 , 177.72211672100607 , 197.33921667067594 , 199.55502285720388 , 188.0319556470213 , 173.87872854689405 , 143.46043519956464 , 141.0882547711237 , 332.59696733388904 , 172.84926845971705 , 283.5475775260362 , 248.01442960356343 , 402.45591878731483 , 181.05531414772926 , 402.45591878731483 , 210.6239574761522 , 266.3751238708987 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 90.09009009009009, 90.09009009009009, 99.51845906902086, 94.33962264150944, 94.33962264150944, 130, 121.03505843071787, 94.33962264150944, 99.51845906902086, 138.88888888888889, 138.88888888888889, 104.52961672473867, 130, 130.92979127134726, 110.75441412520064, 110.75441412520064, 83.18345323741008, 94.33962264150944, 123.96694214876032, 236.96682464454977, 145.0381679389313, 123.96694214876032, 220, 145.0381679389313, 177.77777777777777, 245.3102453102453, 229.43722943722943, 177.77777777777777, 125, 113.92405063291139, 99.9083409715857, 345.580404685836, 125, 325.497287522604, 195.65217391304347, 589.0710382513661, 127.47875354107649, 589.0710382513661, 126.55664675508758, 163.60294117647058 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Saarlouis', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });