Angular Google Charts - 基本氣泡圖
以下是基本氣泡圖的示例。
我們在 Google Charts 配置語法 章節中已經瞭解瞭如何使用配置來繪製圖表。現在,我們來看一個氣泡圖示例。
配置
我們使用了 **BubbleChart** 類來顯示基本氣泡圖。
type = 'BubbleChart';
示例
app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Age vs Weight';
type = 'BubbleChart';
data = [
["", 8, 12],
["", 4, 5.5],
["", 11, 14],
["", 3, 3.5],
["", 6.5, 7]
];
columnNames = ['Id', 'Age','Weight'];
options = { };
width = 550;
height = 400;
}
結果
驗證結果。
angular_googlecharts_bubble_charts.htm
廣告