- 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
Pie Chart with exploded slices
Following is an example of a Pie Chart with exploded slices.
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 Pie Chart with exploded slices.
Configurations
We've used slices configuration to show a Pie Chart with exploded slices.
options = { slices: { 1: {offset: 0.2}, 3: {offset: 0.3} }, };
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 = 'Browser market shares at a specific website, 2014'; type = 'PieChart'; data = [ ['Firefox', 45.0], ['IE', 26.8], ['Chrome', 12.8], ['Safari', 8.5], ['Opera', 6.2], ['Others', 0.7] ]; columnNames = ['Browser', 'Percentage']; options = { slices: { 1: {offset: 0.2}, 3: {offset: 0.3} }, }; width = 550; height = 400; }
Result
Verify the result.
angular_googlecharts_pie_charts.htm
Advertisements
To Continue Learning Please Login
Login with Google