import { Component, ElementRef, OnInit, Input } from '@angular/core'; import { CfChartComponent } from '../chart/chart.component'; import { AreaChartModel } from '../../models/chart/area-chart.model'; /** *
Area chart component
*/ @Component({ selector: 'cf-area-chart', template: "Defines if the chart is stacked
*/ @Input() stacked: boolean; /** *Set the minimum value of the y axis to the minimum value in the data, instead of 0
*/ @Input() autoScale: boolean = true; constructor(public elementRef: ElementRef) { super(elementRef); } ngOnInit(): void { super.ngOnInit(); if (! this.properties) { this.properties = new AreaChartModel(); } if (this.autoScale) { this.properties.autoScale = this.autoScale; } if (this.stacked) { this.properties.stacked = this.stacked; } this.setCommonProperties(); } }