Angular-googlecharts-stepped-stacked
提供:Dev Guides
積み上げ階段状チャート
以下は、積み上げ階段状チャートの例です。
link:/angular_googlecharts/angular_googlecharts_configuration_syntax [Googleグラフの構成構文]の章で、グラフを描画するために使用される構成を既に確認しました。 次に、積み上げ階段状チャートの例を見てみましょう。
構成
*isStacked* 構成を使用して、ステップチャートを積み上げとして表示しました。
options = {
isStacked:true
};
例
*_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'
},
isStacked:true
};
width = 550;
height = 400;
}
結果
結果を確認します。