|
|
@@ -30,6 +30,7 @@ export class YearGraphComponent implements OnInit {
|
|
|
ngOnInit() {}
|
|
|
|
|
|
drawGraph(region: string) {
|
|
|
+ const regionData = this.sdmDihService.aggregatedData[this.selectedYear].find((row) => row['MODEL'] === region);
|
|
|
const width = 200;
|
|
|
const height = 200;
|
|
|
//select("#year-graph-place").select("svg")?.remove();
|
|
|
@@ -39,7 +40,7 @@ export class YearGraphComponent implements OnInit {
|
|
|
.attr("width", width)
|
|
|
.attr("height", height)
|
|
|
.append("g")
|
|
|
- .data(this.sdmDihService.aggregatedData[this.selectedYear])
|
|
|
+ .data([regionData])
|
|
|
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
|
|
//const yearData = this.sdmDihService.aggregatedData[this.selectedYear];
|
|
|
//const color = `rgba(100, 200, 100, ${yearData[0]['Natural_Capital']})`;
|