帶有資料標籤的氣泡圖
下面是帶有標籤的氣泡圖示例。
我們在 Google 圖表配置語法 章節中已經瞭解了用於繪製圖表所需的配置。現在,我們來看一個帶有資料標籤的氣泡圖示例。
配置
我們使用了 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 = [
["Robert", 8, 12],
["Mohan", 4, 5.5],
["Ramesh", 11, 14],
["Julie", 3, 3.5],
["Sohan", 6.5, 7]
];
columnNames = ['Id', 'Age','Weight'];
options = { };
width = 550;
height = 400;
}
結果
驗證結果。
angular_googlecharts_bubble_charts.htm
廣告