Angular-googlecharts-stepped-basic
提供:Dev Guides
Google Angular Charts-基本的な階段状チャート
以下は、階段状チャートの例です。
link:/angular_googlecharts/angular_googlecharts_configuration_syntax [Googleグラフの構成構文]の章で、グラフを描画するために使用される構成を既に確認しました。 次に、ステップチャートの例を見てみましょう。
構成
*SteppedAreaChart* クラスを使用して、階段状グラフを表示しました。
type = 'SteppedAreaChart';
例
*_app.component.ts_*
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.componentl',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = "'The decline of 'The 39 Steps'";
type = 'SteppedAreaChart';
data = [
["Alfred Hitchcock (1935)", 8.4, 7.9],
["Ralph Thomas (1959)", 6.9, 6.5],
["Don Sharp (1978)", 6.5, 6.4],
["James Hawes (2008)", 4.4, 6.2]
];
columnNames = ['Director (Year)', 'Rotten Tomatoes','IMDB'];
options = {
vAxis:{
title:'Accumulated Rating'
}
};
width = 550;
height = 400;
}
結果
結果を確認します。