Angular Google Charts - Basic Column Chart
Following is an example of a basic colummn 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 basic Colummn Chart.
Configurations
We've used ColumnChart class to show colummn based chart.
type='ColumnChart';
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 = 'ColumnChart';
data = [
["2012", 900],
["2013", 1000],
["2014", 1170],
["2015", 1250],
["2016", 1530]
];
columnNames = ['Year', 'Asia'];
options = {};
width = 550;
height = 400;
}
Result
Verify the result.
angular_googlecharts_column_charts.htm
Advertisements