开发手册 欢迎您!
软件开发者资料库

Angular Google Charts - 散点图

Angular Google Charts Scatter Chart - 从基本到高级概念的简单简单步骤学习Angular Google Charts,其中包括概述,环境设置,配置语法,区域图表,条形图,气泡图,烛台图表,柱形图,组合图,直方图,折线图,地图,组织结构图,饼图,Sankey图,散点图,阶梯图,表格图,树图。

以下是散点图的示例.

我们已经看到用于在 Google Charts配置语法一章.现在,让我们看一个散点图的示例.

配置

我们使用了 ScatterChart 类来显示散点图.

type ='ScatterChart';

示例

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='ScatterChart';   data = [      [8,12],      [4, 5.5],      [11,14],      [4,5],      [3,3.5],      [6.5,7]   ];   columnNames = ['Age', 'Weight'];   options = {      };   width = 550;   height = 400;}

结果

验证结果.

Scatter Chart