'; 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/waldrach/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 , 9 , 1 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 6 , 4 , 1 , 0 , 2 ]; 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: [ 112.51439993640433 , 155.1270805145273 , 230.57874659617804 , 251.79348492662643 , 253.85367042914376 , 252.03826872800624 , 100.56273474875032 , 128.01148512404106 , 139.93181719495342 , 161.17807865094264 , 161.17807865094264 , 181.50250458369035 , 249.41056321165257 , 188.51606850554543 , 197.45837654130108 , 124.64192989597834 , 156.3378190509067 , 130.5570885444092 , 97.7796222576214 , 112.49049129469621 , 116.79340653422105 , 128.59429804420483 , 123.63952687806987 , 123.17389795663938 , 137.94412061208575 , 156.33767622255053 , 157.85481262851053 , 198.3494399494084 , 387.2401970323924 , 233.05925860425992 , 201.4112585381472 , 138.47220290711397 , 196.6486527543442 , 248.58432678685998 , 203.17128477421696 , 251.30005550089925 , 227.0270717406644 , 118.71313350936538 , 155.8784914763169 , 152.95229763096006 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 70.09345794392523, 101.06382978723404, 122.88786482334869, 111.5485564304462, 149.57780458383596, 154.33070866141733, 80, 101.06382978723404, 90.63214013709063, 101.92076830732293, 101.92076830732293, 111.5485564304462, 143.78029079159936, 143.78029079159936, 150.36231884057972, 101.06382978723404, 150.36231884057972, 130, 77.95275590551181, 143.78029079159936, 128.42465753424656, 136.986301369863, 136.986301369863, 136.44366197183098, 136.44366197183098, 137.57861635220127, 143.78029079159936, 138.36477987421384, 260, 230.4147465437788, 175.7188498402556, 143.78029079159936, 143.78029079159936, 178.51239669421489, 138.44515441959533, 218.707015130674, 138.36477987421384, 127.62520193861066, 138.36477987421384, 127.62520193861066 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Waldrach', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });