Angular Highcharts:3D柱状图(3D Column Chart)
现在我们来看一个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] }] }; }
结果