Angular-googlecharts-configuration-syntax
提供:Dev Guides
角度付きGoogleチャート-構成構文
この章では、AngularのGoogle Chart APIを使用してグラフを描画するために必要な構成を紹介します。
ステップ1-角度アプリケーションを作成する
次の手順に従って、_Angular 6-Project Setup_章で作成したAngularアプリケーションを更新します-
Step | Description |
---|---|
1 | Create a project with a name googleChartsApp as explained in the Angular 6 - Project Setup chapter. |
2 | Modify app.module.ts, app.component.ts and app.componentl as explained below. Keep rest of the files unchanged. |
3 | Compile and run the application to verify the result of the implemented logic. |
変更されたモジュール記述子 app.module.ts の内容は次のとおりです。
以下は、変更されたHTMLホストファイル app.componentl の内容です。
構成を理解した後、最後に更新されたapp.component.tsが表示されます。
ステップ2-構成の使用
タイトルを設定
チャートタイプの設定
data
チャートに表示されるデータを構成します。
列名
表示する列名を構成します。
オプション
他のオプションを設定します。
例
構成構文をさらに理解するには、次の例を検討してください-
結果
結果を確認します。