- Angular Google Charts Tutorial
- Home
- Overview
- Environment Setup
- Configuration Syntax
- Area Charts
- Bar Charts
- Bubble Charts
- Candlestick
- Column Charts
- Combination
- Histogram
- Line Charts
- Maps
- Organization
- Pie Charts
- Sankey Charts
- Scatter Chart
- Stepped Area
- Table Chart
- TreeMap Chart
- Angular Google Charts Resources
- Quick Guide
- Resources
- Discussion
Stacked Column Chart
Following is an example of a Stacked Column Chart.
We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an example of a Stacked Column Chart.
Configurations
We've used isStacked option to show column based chart as stacked.
options = { isStacked:true, }
Example
app.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'Population (in millions)'; type = 'BarChart'; data = [ ["2012", 900, 390], ["2013", 1000, 400], ["2014", 1170, 440], ["2015", 1250, 480], ["2016", 1530, 540] ]; columnNames = ['Year', 'Asia','Europe']; options = { hAxis: { title: 'Year' }, vAxis:{ minValue:0 }, isStacked:true }; width = 550; height = 400; }
Result
Verify the result.
angular_googlecharts_column_charts.htm
Advertisements