Angular-googlecharts-pie-3d

提供:Dev Guides
移動先:案内検索

Google Angular Charts-3D円グラフ

以下は3Dチャートの例です。

link:/angular_googlecharts/angular_googlecharts_configuration_syntax [Googleグラフの構成構文]の章で、グラフを描画するために使用される構成を既に確認しました。 ここで、ドーナツチャートの例を見てみましょう。

構成

*is3D* 構成を使用して、円グラフを3D円グラフとして表示しました。
options = {
   is3D:true
};

*_app.component.ts_*
import { Component } from '@angular/core';
@Component({
   selector: 'app-root',
   templateUrl: './app.componentl',
   styleUrls: ['./app.component.css']
})
export class AppComponent {
   title = 'Browser market shares at a specific website, 2014';
   type = 'PieChart';
   data = [
      ['Firefox', 45.0],
      ['IE', 26.8],
      ['Chrome', 12.8],
      ['Safari', 8.5],
      ['Opera', 6.2],
      ['Others', 0.7]
   ];
   columnNames = ['Browser', 'Percentage'];
   options = {
      is3D:true
   };
   width = 550;
   height = 400;
}

結果

結果を確認します。

3D円グラフ