Angular-googlecharts-map-basic
提供:Dev Guides
角度付きGoogleグラフ-基本的な地図グラフ
以下は、基本的なマップチャートの例です。
link:/angular_googlecharts/angular_googlecharts_configuration_syntax [Googleグラフの構成構文]の章で、グラフを描画するために使用される構成を既に確認しました。 次に、マップチャートの例を見てみましょう。
構成
*Map* クラスを使用して、基本的なマップチャートを表示しました。
例
*_app.component.ts_*
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.componentl',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = '';
type = 'Map';
data = [
["China", "China: 1,363,800,000"],
["India", "India: 1,242,620,000"],
["US", "US: 317,842,000"],
["Indonesia", "Indonesia: 247,424,598"],
["Brazil", "Brazil: 201,032,714"],
["Pakistan", "Pakistan: 186,134,000"],
["Nigeria", "Nigeria: 173,615,000"],
["Bangladesh", "Bangladesh: 152,518,015"],
["Russia", "Russia: 146,019,512"],
["Japan", "Japan: 127,120,000"]
];
columnNames = ["Country","Population"];
options = {
showTip: true
};
width = 550;
height = 400;
}
結果
結果を確認します。