Angular-googlecharts-organization-chart

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

Angular Google Charts-組織図

以下は組織図の例です。

組織図は、組織の上位/下位の関係を表すために使用されるノードの階層のレンダリングに役立ちます。 たとえば、家系図は組織図の一種です。 link:/angular_googlecharts/angular_googlecharts_configuration_syntax [Googleグラフの構成構文]の章で、グラフを描画するために使用される構成を既に確認しました。 次に、組織図の例を見てみましょう。

構成

組織図を表示するために OrgChart クラスを使用しました。

type='OrgChart';

*_app.component.ts_*
import { Component } from '@angular/core';
@Component({
   selector: 'app-root',
   templateUrl: './app.componentl',
   styleUrls: ['./app.component.css']
})
export class AppComponent {
   title = '';
   type = 'OrgChart';
   data = [
      [{v:'Mike', f:'Mike<div style="color:red; font-style:italic">President</div>'},
         '', 'The President'],
      [{v:'Jim', f:'Jim<div style="color:red; font-style:italic">Vice President</div>'},
         'Mike', 'VP'],
      ['Alice', 'Mike', ''],
      ['Bob', 'Jim', 'Bob Sponge'],
      ['Carol', 'Bob', '']
   ];
   columnNames = ["Name","Manager","Tooltip"];
   options = {
      allowHtml: true
   };
   width = 550;
   height = 400;
}

結果

結果を確認します。

組織図