import { Component, ElementRef, OnInit, Input } from '@angular/core'; import { CfChartComponent } from '../chart/chart.component'; import { LineChartModel } from '../../models/chart/line-chart.model'; /** *
Line chart component
*/ @Component({ selector: 'cf-line-chart', template: "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 LineChartModel(); } if (this.autoScale) { this.properties.autoScale = this.autoScale; } this.setCommonProperties(); } }