Angular Highcharts - 3D 柱形图
以下是 3D 柱形图的示例。
我们已经在Highcharts 配置语法章节中看到了用于绘制图表的配置。
下面给出了 3D 柱形图的示例。
配置
现在让我们看看采取的其他配置/步骤。
option3D
将柱形图类型配置为基于 3D。 Options3D 设置启用的 3D 选项。
chart: {
options3d: {
enabled: true,
alpha: 15,
beta: 15,
depth: 50,
viewDistance: 25
}
}
示例
app.component.ts
import { Component } from '@angular/core';
import * as Highcharts from 'highcharts';
import highcharts3D from 'highcharts/highcharts-3d.src';
highcharts3D(Highcharts);
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
highcharts = Highcharts;
chartOptions = {
chart: {
renderTo: 'container',
type: 'column',
margin: 75,
options3d: {
enabled: true,
alpha: 15,
beta: 15,
depth: 50,
viewDistance: 25
}
},
title : {
text: 'Chart rotation demo'
},
plotOptions : {
column: {
depth: 25
}
},
series : [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4,
194.1, 95.6, 54.4]
}]
};
}
结果
验证结果。
❮ angular_highcharts_3d_charts.html

