import { CoreModel } from '../core/core.model'; export class GaugeModel extends CoreModel { /** * Maximum integer value of gauge */ max: number; /** * Current integer value of gauge */ value: number; /** * Label of gauge */ label: string; /** * Prefix of gauge */ prefix: string; /** * Suffix of gauge */ suffix: string; /** * Type value of gauge. Can be: full, arch, semi. Default is full. */ type: string; /** * Aanimation duration of gauge in seconds */ size: number; /** * Size for width/height of gauge. It means number of pixels. */ animationDuration: number; /** * It is the constructor for the gauge component. It takes the required string values to create the gauge object */ constructor(values: Object = {}) { super(values); Object.assign(this, values); if (this.max==null) this.max = 100; if (this.value==null) this.max = 0; if (this.type==null) this.type = 'full'; if (this.size==null) this.max = 150; if (this.animationDuration==null) this.max = 1; } }