import { OnInit, OnChanges, DoCheck, ElementRef, KeyValueDiffers } from '@angular/core'; import { CfCoreComponent } from '../core/core.component'; import { GaugeModel } from '../../models/gauge/gauge.model'; import { GaugeStylingModel } from '../../models/gauge/gauge-styling.model'; /** *

Gauge component is a modification of Angular gauge with added label, prefix and suffix elements. All elements can be customized and stylized.

*

Example of using:

*
 * <cf-gauge [properties]="myGauge" [styling]="myGaugeStyles"></cf-gauge>
 * 
*/ export declare class CfGaugeComponent extends CfCoreComponent implements OnInit, OnChanges, DoCheck { elementRef: ElementRef; /** * It is an object with GaugeModel type to be rendered inside cf-gauge template. */ cfGauge: GaugeModel; /** * Object to register element state and compute differences. */ differ: any; /** * It is a clone of gauge value to work with calculated effect during gauge animation time. It is using only inside component functionality. */ _animatedValue: number; /** * It is time of one point change of _animatedValue during animation time. */ _tickInterval: number; /** * It is increase or decrease of gauge value */ _animationValueDirection: string; /** * It is number of ticks between previous and current gauge value. */ _ticks: number; /** * It is an attribute [properties] of directive cf-gauge which take GaugeModel object. *

Example:

*
{
   *  max: 100,
   *  value: 35,
   *  type: 'arch',
   *  size: 150,
   *  label: 'Gauge label',
   *  prefix: 'prefix',
   *  suffix: 'suffix',
   *  animationDuration: 1
   * }
*

max: number

* It is maximum integer value of gauge *

value: number

* Current integer value of gauge *

type: string

* Type value of gauge. Can be: full, arch, semi. Default is 'full'. *

label: string

* Label of gauge *

prefix: string

* Prefix of gauge *

suffix: string

* Suffix of gauge *

size: number

* It is size of gauge. Means number of pixels. *

animationDuration: number

* Aanimation duration of gauge in seconds */ properties: GaugeModel; /** * It is an object with styling for two component elements */ styling: GaugeStylingModel; /** * It is [display] attribute of cf-gauge component */ display: boolean; /** * It is [disable] attribute of cf-gauge component */ disable: boolean; /** * It is selected type of gauge. It consists of start/end coordinates for svg elements. */ _type: { start: number; end: number; }; /** * It is an object with all gauges types and their start/end coordinates. */ _types: { "full": { start: number; end: number; }; "arch": { start: number; end: number; }; "semi": { start: number; end: number; }; }; valueToShow: any; valueToEditContainer: any; valueToEdit: any; _setInputWidth(): void; _mode: string; _changeGaugeValue($event: any): void; _showInput($event: any): void; /** * It is function to increase / decrease gauge value from previous to current during animation time. Used only inside component logic. */ private _animatingValue(); /** * It is function to recalculate value if it was changed during animation time. Used only inside component logic. * @param prev previous value * @param curr current value */ private _animateValueChange(prev, curr); _centerX: number; _centerY: number; _clickedRatio: number; private _pickFullTypeValue(eX, eY); private _pickArchTypeValue(eX, eY); private _pickSemiTypeValue(eX, eY); private _pickValue(eX, eY); constructor(elementRef: ElementRef, differs: KeyValueDiffers); ngOnInit(): void; ngOnChanges(changes: any): void; ngDoCheck(): void; }