'; 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/gevelsberg/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 , 9 , 0 , 1 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 2 , 6 , 2 , 4 ]; 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', '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: [ 198.57367643340496 , 243.95760816135095 , 314.47021824340106 , 234.89273597195108 , 234.89273597195108 , 223.92212321342197 , 232.71214258585255 , 241.14775535685624 , 330.31002523864413 , 328.0021388545433 , 328.0021388545433 , 365.0177530790659 , 357.47071970052923 , 346.88309785932097 , 391.3954377359192 , 374.6171021645207 , 319.32010500710703 , 341.17823876295375 , 343.77489298031645 , 429.00739298818235 , 445.124138700667 , 402.7197665047347 , 394.6693526999475 , 322.47178340739396 , 279.9135959425425 , 318.89056190885793 , 312.86077874607446 , 315.82817213945566 , 307.0770192773856 , 277.2234316512078 , 306.9442417656189 , 309.63438381364915 , 263.2429231482457 , 300.8095444725224 , 253.5483488022369 , 266.3354979975188 , 204.94897959183675 , 332.09982237305206 , 312.2182044967536 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 185.80375782881003, 200, 181.72377985462097, 200, 200, 200, 229.88505747126436, 200, 312.5, 330, 330, 453.94736842105266, 368.7002652519894, 361.236802413273, 426.41509433962267, 383.38658146964855, 270.60782681099084, 372.0849420849421, 370.9985315712188, 425.28735632183907, 425.28735632183907, 396.22641509433964, 396.22641509433964, 295.0495049504951, 280.95238095238096, 378.8246721709568, 312.5, 294.7956379111623, 268.6084142394822, 287.6892692560895, 287.6892692560895, 425.28735632183907, 242.83632831471587, 312.5, 312.5, 266, 244.89795918367346, 325, 298.59719438877755 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Gevelsberg', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });