Angular-highcharts-area-negative
提供:Dev Guides
負の値を持つ面グラフ
このチャートを描画するために使用される構成は、リンク:/angular_highcharts/angular_highcharts_configuration_syntax [Highcharts構成構文]の章ですでに見ています。 基本的な面グラフをさらに理解するために、次の例を考えてみましょう。
例
*_app.component.ts_*
import { Component } from '@angular/core';
import * as Highcharts from 'highcharts';
@Component({
selector: 'app-root',
templateUrl: './app.componentl',
styleUrls: ['./app.component.css']
})
export class AppComponent {
highcharts = Highcharts;
chartOptions = {
chart: {
type: "area"
},
title: {
text: 'Area chart with negative values'
},
xAxis:{
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
credits:{
enabled: false
},
series: [
{
name: 'John',
data: [5, 3, 4, 7, 2]
},
{
name: 'Jane',
data: [2, -2, -3, 2, 1]
},
{
name: 'Joe',
data: [3, 4, 4, -2, 5]
}
]
};
}
結果
結果を確認します。