'; 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/neukirch/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 , 0 , 3 , 2 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 5 , 0 , 0 , 0 , 0 ]; 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', 'Juni 2023', 'Juli 2023' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 504.6544563059277 , 265.21219597873994 , 751.263856362217 , 799.6493506493506 , 766.2575757575756 , 824.0849493534671 , 752.3052370406625 , 755.9462018447749 , 671.3080207089055 , 554.8515003733013 , 554.8515003733013 , 661.4713179399718 , 945.0155801789559 , 968.665226863956 , 1108.9181709882912 , 812.0368741425932 , 970.544739438315 , 773.7225828176493 , 34.615792333351564 , 53.66831766955778 , 28.8098966169262 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 207.76380535811919, 188.627665390924, 1215.8469945355191, 1250, 1250, 1245.2830188679245, 1245.2830188679245, 671.6417910447761, 657.1087216248507, 593.2126833087417, 593.2126833087417, 593.2126833087417, 664.4444444444445, 1215.8469945355191, 1215.8469945355191, 485.408560311284, 1215.8469945355191, 724.1379310344828, 21.654929577464788, 98.60557768924303, 21.654929577464788 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Neukirch', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });