0
現在AM Charts Mapsで作業しています。私はangularjsで以下のリンクを実装したいと思います。どのように角度jに変換するのですか?私は指令を実装する必要がありますか?AMcharts角度jsの地図
<div id="chartdiv"></div>
現在AM Charts Mapsで作業しています。私はangularjsで以下のリンクを実装したいと思います。どのように角度jに変換するのですか?私は指令を実装する必要がありますか?AMcharts角度jsの地図
<div id="chartdiv"></div>
あなたは、コンポーネントの次のファイルを追加することができます。
map.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './map.component.html',
styleUrls: ['./map.component.css']
})
export class MapComponent {
private id = "mapdiv";
private options;
makeChartConfig() {
return {
"type": "map",
"theme": "light",
"colorSteps": 10,
"dataProvider": {
"map": "indiaLow",
"areas": [{
"id": "IN-AN",
"value": 4447100
}, {
"id": "IN-AP",
"value": 626932
}, {
"id": "IN-KA",
"value": 5130632
}]
},
"areasSettings": {
"autoZoom": true
},
"valueLegend": {
"right": 10,
"minValue": "little",
"maxValue": "a lot!"
}
};
}
ngOnInit() {
this.options = this.makeChartConfig();
}
}
map.component.html
<amCharts [id]="id" [options]="options" [style.width.%]="100" [style.height.px]="500"></amCharts>