igniteui-angular-gauges
Version:
Ignite UI Angular gauge components.
562 lines (555 loc) • 27.5 kB
TypeScript
import { OnDestroy, EventEmitter, AfterViewInit, TemplateRef, Injector, ComponentFactoryResolver, AfterContentInit, Renderer2, QueryList, NgZone, ViewContainerRef } from '@angular/core';
import { IgPoint } from "igniteui-angular-core";
import { XamBulletGraph } from './XamBulletGraph';
import { LinearScaleOrientation } from './LinearScaleOrientation';
import { IgxFormatLinearGraphLabelEventArgs } from './igx-format-linear-graph-label-event-args';
import { IgxAlignLinearGraphLabelEventArgs } from './igx-align-linear-graph-label-event-args';
import { IgxLinearGraphRangeComponent } from './igx-linear-graph-range-component';
import { IgxLinearGraphRangeCollection } from './igx-linear-graph-range-collection';
import { HighlightedValueDisplayMode } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
* Represents a bullet graph.
*/
export declare class IgxBulletGraphComponent implements AfterContentInit, AfterViewInit, OnDestroy {
private _renderer;
private _elRef;
private _ngZone;
private _componentFactoryResolver;
private _injector;
_dynamicContent: ViewContainerRef;
private _height;
private _width;
set height(value: string);
get height(): string;
set width(value: string);
get width(): string;
private _container;
contentRanges: QueryList<IgxLinearGraphRangeComponent>;
/**
* The ranges actually present in the chart. Do not directly modify this array.
* This array's contents can be modified by causing Angular to reproject the child content.
* Or adding and removing ranges from the manual ranges collection on the ranges property.
*/
actualRanges: IgxLinearGraphRangeComponent[];
private _ranges;
private _rangesAdapter;
/**
* A collection or manually added axes for the chart.
*/
get ranges(): IgxLinearGraphRangeCollection;
private _root;
constructor(_renderer: Renderer2, _elRef: ViewContainerRef, _ngZone: NgZone, _componentFactoryResolver: ComponentFactoryResolver, _injector: Injector);
ngOnDestroy(): void;
private _wrapper;
protected createImplementation(): XamBulletGraph;
private _gauge;
ngAfterContentInit(): void;
ngAfterViewInit(): void;
updateStyle(): void;
private _tooltipTemplate;
private _tooltipContent;
set tooltipTemplate(value: TemplateRef<any>);
get tooltipTemplate(): TemplateRef<any>;
private _ensureTooltipCreated;
private createWrapper;
private _defaultTooltips;
private _ensureDefaultTooltip;
private _onDefaultTooltipsReady;
private createTooltip;
protected _zoneRunner: (act: () => void) => void;
protected _runInZone(act: () => void): void;
protected _implementation: any;
/**
* @hidden
*/
get i(): XamBulletGraph; /**
* @hidden
*/
static _createFromInternal(internal: any): IgxBulletGraphComponent;
/**
* Gets a value indicating whether the bullet graph is currently animating.
*/
get animating(): boolean;
static ngAcceptInputType_animating: boolean | string;
/**
* Gets the transition progress of the animation when the control is animating.
*/
get transitionProgress(): number;
set transitionProgress(v: number);
static ngAcceptInputType_transitionProgress: number | string;
/**
* Gets or sets the orientation of the scale.
*/
get orientation(): LinearScaleOrientation;
set orientation(v: LinearScaleOrientation);
static ngAcceptInputType_orientation: LinearScaleOrientation | string;
/**
* Gets or sets the background brush for the scale.
*/
get scaleBackgroundBrush(): string;
set scaleBackgroundBrush(v: string);
/**
* Gets or sets the background outline for the scale.
*/
get scaleBackgroundOutline(): string;
set scaleBackgroundOutline(v: string);
/**
* Gets or sets the background outline thickness for the scale.
*/
get scaleBackgroundThickness(): number;
set scaleBackgroundThickness(v: number);
static ngAcceptInputType_scaleBackgroundThickness: number | string;
/**
* Gets or sets a collection of brushes to be used as the palette for bullet graph ranges.
*/
get rangeBrushes(): string[];
set rangeBrushes(v: string[]);
static ngAcceptInputType_rangeBrushes: string[] | string;
/**
* Gets or sets a collection of brushes to be used as the palette for bullet graph outlines.
*/
get rangeOutlines(): string[];
set rangeOutlines(v: string[]);
static ngAcceptInputType_rangeOutlines: string[] | string;
/**
* Gets or sets the minimum value of the scale.
*/
get minimumValue(): number;
set minimumValue(v: number);
static ngAcceptInputType_minimumValue: number | string;
/**
* Gets the resolved minimum value of the scale.
*/
get actualMinimumValue(): number;
set actualMinimumValue(v: number);
static ngAcceptInputType_actualMinimumValue: number | string;
/**
* Gets or sets the maximum value of the scale.
*/
get maximumValue(): number;
set maximumValue(v: number);
static ngAcceptInputType_maximumValue: number | string;
/**
* Gets the resolved maximum value of the scale.
*/
get actualMaximumValue(): number;
set actualMaximumValue(v: number);
static ngAcceptInputType_actualMaximumValue: number | string;
/**
* Gets or sets the value indicated by the target value bar.
*/
get targetValue(): number;
set targetValue(v: number);
static ngAcceptInputType_targetValue: number | string;
/**
* Gets or sets the name used for the target value. The name is displayed in the default target value tooltip.
*/
get targetValueName(): string;
set targetValueName(v: string);
/**
* Gets or sets the value at which the bar ends.
*/
get value(): number;
set value(v: number);
static ngAcceptInputType_value: number | string;
/**
* Gets or sets the name used for actual value.
*/
get valueName(): string;
set valueName(v: string);
/**
* Gets or sets the highlight value at which to point the secondary needle of the gauge.
*/
get highlightValue(): number;
set highlightValue(v: number);
static ngAcceptInputType_highlightValue: number | string;
/**
* Gets the actual opacity of the primary needle while highlighting
*/
get actualHighlightValueOpacity(): number;
set actualHighlightValueOpacity(v: number);
static ngAcceptInputType_actualHighlightValueOpacity: number | string;
/**
* Gets or sets the opacity of the primary needle while highlighting
*/
get highlightValueOpacity(): number;
set highlightValueOpacity(v: number);
static ngAcceptInputType_highlightValueOpacity: number | string;
/**
* Gets whether and how to display the highlighted value.
*/
get actualHighlightValueDisplayMode(): HighlightedValueDisplayMode;
set actualHighlightValueDisplayMode(v: HighlightedValueDisplayMode);
static ngAcceptInputType_actualHighlightValueDisplayMode: HighlightedValueDisplayMode | string;
/**
* Gets or sets whether and how to display the highlighted value.
*/
get highlightValueDisplayMode(): HighlightedValueDisplayMode;
set highlightValueDisplayMode(v: HighlightedValueDisplayMode);
static ngAcceptInputType_highlightValueDisplayMode: HighlightedValueDisplayMode | string;
/**
* Gets or sets the position at which to start rendering the ranges, measured from the front/bottom of the control as a value from 0 to 1.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get rangeInnerExtent(): number;
set rangeInnerExtent(v: number);
static ngAcceptInputType_rangeInnerExtent: number | string;
/**
* Gets or sets the position at which to stop rendering the range as a value from 0 to 1 measured from the front/bottom of the bullet graph.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get rangeOuterExtent(): number;
set rangeOuterExtent(v: number);
static ngAcceptInputType_rangeOuterExtent: number | string;
/**
* Gets or sets the position at which to start rendering the actual value geometries, measured from the front/bottom of the bullet graph as a value from 0 to 1.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get valueInnerExtent(): number;
set valueInnerExtent(v: number);
static ngAcceptInputType_valueInnerExtent: number | string;
/**
* Gets or sets the position at which to stop rendering the actual value geometries as a value from 0 to 1 measured from the front/bottom of the bullet graph.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get valueOuterExtent(): number;
set valueOuterExtent(v: number);
static ngAcceptInputType_valueOuterExtent: number | string;
/**
* Gets or sets the interval to use for the scale.
*/
get interval(): number;
set interval(v: number);
static ngAcceptInputType_interval: number | string;
/**
* A value to start adding tickmarks, added to the scale's MinimumValue.
*/
get ticksPostInitial(): number;
set ticksPostInitial(v: number);
static ngAcceptInputType_ticksPostInitial: number | string;
/**
* A value to stop adding tickmarks, subtracted from the scale's MaximumValue.
*/
get ticksPreTerminal(): number;
set ticksPreTerminal(v: number);
static ngAcceptInputType_ticksPreTerminal: number | string;
/**
* Gets or sets the interval to use for rendering labels. This defaults to be the same interval as the tickmarks on the scale.
*/
get labelInterval(): number;
set labelInterval(v: number);
static ngAcceptInputType_labelInterval: number | string;
/**
* Gets or sets the position at which to put the labels as a value from 0 to 1, measured from the bottom of the scale.
* Values further from zero than 1 can be used to hide the labels of the bullet graph.
*/
get labelExtent(): number;
set labelExtent(v: number);
static ngAcceptInputType_labelExtent: number | string;
/**
* A value to start adding labels, added to the scale's MinimumValue.
*/
get labelsPostInitial(): number;
set labelsPostInitial(v: number);
static ngAcceptInputType_labelsPostInitial: number | string;
/**
* A value to stop adding labels, subtracted from the scale's MaximumValue.
*/
get labelsPreTerminal(): number;
set labelsPreTerminal(v: number);
static ngAcceptInputType_labelsPreTerminal: number | string;
/**
* Gets or sets the number of minor tickmarks to place between major tickmarks.
*/
get minorTickCount(): number;
set minorTickCount(v: number);
static ngAcceptInputType_minorTickCount: number | string;
/**
* Gets or sets the position at which to start rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get tickStartExtent(): number;
set tickStartExtent(v: number);
static ngAcceptInputType_tickStartExtent: number | string;
/**
* Gets or sets the position at which to stop rendering the major tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get tickEndExtent(): number;
set tickEndExtent(v: number);
static ngAcceptInputType_tickEndExtent: number | string;
/**
* Gets or sets the stroke thickness to use when rendering ticks.
*/
get tickStrokeThickness(): number;
set tickStrokeThickness(v: number);
static ngAcceptInputType_tickStrokeThickness: number | string;
/**
* Gets or sets the brush to use for the major tickmarks.
*/
get tickBrush(): string;
set tickBrush(v: string);
/**
* Gets or sets the brush to use for the label font.
*/
get fontBrush(): string;
set fontBrush(v: string);
/**
* Gets or sets the brush to use for the actual value element.
*/
get valueBrush(): string;
set valueBrush(v: string);
/**
* Gets or sets the brush to use for the outline of actual value element.
*/
get valueOutline(): string;
set valueOutline(v: string);
/**
* Gets or sets the stroke thickness to use when rendering single actual value element.
*/
get valueStrokeThickness(): number;
set valueStrokeThickness(v: number);
static ngAcceptInputType_valueStrokeThickness: number | string;
/**
* Gets or sets the position at which to start rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get minorTickStartExtent(): number;
set minorTickStartExtent(v: number);
static ngAcceptInputType_minorTickStartExtent: number | string;
/**
* Gets or sets the position at which to stop rendering the minor tickmarks as a value from 0 to 1, measured from the front/bottom of the bullet graph.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get minorTickEndExtent(): number;
set minorTickEndExtent(v: number);
static ngAcceptInputType_minorTickEndExtent: number | string;
/**
* Gets or sets the stroke thickness to use when rendering minor ticks.
*/
get minorTickStrokeThickness(): number;
set minorTickStrokeThickness(v: number);
static ngAcceptInputType_minorTickStrokeThickness: number | string;
/**
* Gets or sets the brush to use for the minor tickmarks.
*/
get minorTickBrush(): string;
set minorTickBrush(v: string);
/**
* Gets or sets a value indicating whether the scale is inverted.
* When the scale is inverted the direction in which the scale values increase is right to left.
*/
get isScaleInverted(): boolean;
set isScaleInverted(v: boolean);
static ngAcceptInputType_isScaleInverted: boolean | string;
/**
* Gets or sets the brush to use to fill the backing of the bullet graph.
*/
get backingBrush(): string;
set backingBrush(v: string);
/**
* Gets or sets the brush to use for the outline of the backing.
*/
get backingOutline(): string;
set backingOutline(v: string);
/**
* Gets or sets the stroke thickness of the backing outline.
*/
get backingStrokeThickness(): number;
set backingStrokeThickness(v: number);
static ngAcceptInputType_backingStrokeThickness: number | string;
/**
* Gets or sets the inner extent of the bullet graph backing.
*/
get backingInnerExtent(): number;
set backingInnerExtent(v: number);
static ngAcceptInputType_backingInnerExtent: number | string;
/**
* Gets or sets the outer extent of the bullet graph backing.
*/
get backingOuterExtent(): number;
set backingOuterExtent(v: number);
static ngAcceptInputType_backingOuterExtent: number | string;
/**
* Gets or sets the position at which to start rendering the scale, measured from the front/bottom of the bullet graph as a value from 0 to 1.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get scaleStartExtent(): number;
set scaleStartExtent(v: number);
static ngAcceptInputType_scaleStartExtent: number | string;
/**
* Gets or sets the position at which to stop rendering the scale as a value from 0 to 1, measured from the front/bottom of the bullet graph.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get scaleEndExtent(): number;
set scaleEndExtent(v: number);
static ngAcceptInputType_scaleEndExtent: number | string;
/**
* Gets or sets the brush to use when rendering the fill of the comparative marker.
*/
get targetValueBrush(): string;
set targetValueBrush(v: string);
/**
* Get or sets the breadth of the target value element.
*/
get targetValueBreadth(): number;
set targetValueBreadth(v: number);
static ngAcceptInputType_targetValueBreadth: number | string;
/**
* Gets or sets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get targetValueInnerExtent(): number;
set targetValueInnerExtent(v: number);
static ngAcceptInputType_targetValueInnerExtent: number | string;
/**
* Gets or sets the position at which to start rendering the target value, measured from the front/bottom of the control as a value from 0 to 1.
* Values further from zero than 1 can be used to make this extend further than the normal size of the bullet graph.
*/
get targetValueOuterExtent(): number;
set targetValueOuterExtent(v: number);
static ngAcceptInputType_targetValueOuterExtent: number | string;
/**
* Gets or sets the brush to use when rendering the outline of the target value.
*/
get targetValueOutline(): string;
set targetValueOutline(v: string);
/**
* Gets or sets the stroke thickness of the outline of the target value bar.
*/
get targetValueStrokeThickness(): number;
set targetValueStrokeThickness(v: number);
static ngAcceptInputType_targetValueStrokeThickness: number | string;
/**
* Gets or sets whether the scale viewport will be merged with backing viewport.
*/
get mergeViewports(): boolean;
set mergeViewports(v: boolean);
static ngAcceptInputType_mergeViewports: boolean | string;
/**
* Gets or sets the label composite format used when creating label values.
*/
get labelFormat(): string;
set labelFormat(v: string);
/**
* Gets or sets the format specifiers to use with the LabelFormat string.
*/
get labelFormatSpecifiers(): any[];
set labelFormatSpecifiers(v: any[]);
static ngAcceptInputType_labelFormatSpecifiers: any[] | string;
/**
* Gets or sets the number of milliseconds over which changes to the bullet graph should be animated.
*/
get transitionDuration(): number;
set transitionDuration(v: number);
static ngAcceptInputType_transitionDuration: number | string;
/**
* Gets or sets the time in milliseconds that tooltip appearance is delayed with.
*/
get showToolTipTimeout(): number;
set showToolTipTimeout(v: number);
static ngAcceptInputType_showToolTipTimeout: number | string;
/**
* Gets or sets a value indicating whether tooltips are enabled.
*/
get showToolTip(): boolean;
set showToolTip(v: boolean);
static ngAcceptInputType_showToolTip: boolean | string;
/**
* Gets or sets the font.
*/
get font(): string;
set font(v: string);
/**
* Gets or sets the scaling value used to affect the pixel density of the control.
* A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control
* to appear blurry.
*/
get pixelScalingRatio(): number;
set pixelScalingRatio(v: number);
static ngAcceptInputType_pixelScalingRatio: number | string;
/**
* Gets the actual pixel scaling ratio used to affect the pixel density of the control.
* A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control
* to appear blurry.
*/
get actualPixelScalingRatio(): number;
set actualPixelScalingRatio(v: number);
static ngAcceptInputType_actualPixelScalingRatio: number | string;
findByName(name: string): any;
protected __p: string;
protected _hasUserValues: Set<string>;
protected get hasUserValues(): Set<string>;
protected __m(propertyName: string): void;
protected _stylingContainer: any;
protected _stylingParent: any;
protected _inStyling: boolean;
protected _styling(container: any, component: any, parent?: any): void;
/**
* Gets the value for the main scale of the bullet graph for a given point within the bounds of the bullet graph.
* @param point * The point for which to retrieve the associated value.
*/
getValueForPoint(point: IgPoint): number;
/**
* Returns visuals as a serialized string.
*/
exportSerializedVisualData(): string;
/**
* Provide a container for the bullet graph.
* @param container * The container.
*/
provideContainer(container: any): void;
/**
* Notify that the container has resized.
*/
containerResized(): void;
/**
* Notify that the bullet graph styling has updated.
*/
styleUpdated(): void;
/**
* Use to force the bullet graph to finish any deferred work before printing or evaluating its visual.
* This should only be called if the visual of the bullet graph needs to be synchronously saved or evaluated.
* Calling this method too often will hinder the performance of the bullet graph.
*/
flush(): void;
private _formatLabel;
/**
* Event which is raised when a label of the bullet graph is formatted.
* Function takes first argument evt and second argument ui.
* Use ui.owner to obtain reference to the bullet graph widget.
* Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale.
* Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale.
* Use ui.value to obtain the value on the the bullet graph scale associated with the label.
* Use ui.label to obtain the string value of the label.
*/
get formatLabel(): EventEmitter<{
sender: any;
args: IgxFormatLinearGraphLabelEventArgs;
}>;
private _alignLabel;
/**
* Event which is raised when a label of the bullet graph is aligned along the scale.
* Function takes first argument evt and second argument ui.
* Use ui.owner to obtain reference to gauge widget.
* Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale.
* Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale.
* Use ui.value to obtain the value on the the bullet graph scale associated with the label.
* Use ui.label to obtain the string value of the label.
* Use ui.width to obtain the width of the label.
* Use ui.height to obtain the height of the label.
* Use ui.offsetX to obtain the X offset of the label on the bullet graph scale.
* Use ui.offsetY to obtain the Y offset of the label on the bullet graph scale.
*/
get alignLabel(): EventEmitter<{
sender: any;
args: IgxAlignLinearGraphLabelEventArgs;
}>;
private _actualMinimumValueChange;
get actualMinimumValueChange(): EventEmitter<number>;
private _actualMaximumValueChange;
get actualMaximumValueChange(): EventEmitter<number>;
static ɵfac: i0.ɵɵFactoryDeclaration<IgxBulletGraphComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<IgxBulletGraphComponent, "igx-bullet-graph", never, { "height": "height"; "width": "width"; "tooltipTemplate": "tooltipTemplate"; "transitionProgress": "transitionProgress"; "orientation": "orientation"; "scaleBackgroundBrush": "scaleBackgroundBrush"; "scaleBackgroundOutline": "scaleBackgroundOutline"; "scaleBackgroundThickness": "scaleBackgroundThickness"; "rangeBrushes": "rangeBrushes"; "rangeOutlines": "rangeOutlines"; "minimumValue": "minimumValue"; "actualMinimumValue": "actualMinimumValue"; "maximumValue": "maximumValue"; "actualMaximumValue": "actualMaximumValue"; "targetValue": "targetValue"; "targetValueName": "targetValueName"; "value": "value"; "valueName": "valueName"; "highlightValue": "highlightValue"; "actualHighlightValueOpacity": "actualHighlightValueOpacity"; "highlightValueOpacity": "highlightValueOpacity"; "actualHighlightValueDisplayMode": "actualHighlightValueDisplayMode"; "highlightValueDisplayMode": "highlightValueDisplayMode"; "rangeInnerExtent": "rangeInnerExtent"; "rangeOuterExtent": "rangeOuterExtent"; "valueInnerExtent": "valueInnerExtent"; "valueOuterExtent": "valueOuterExtent"; "interval": "interval"; "ticksPostInitial": "ticksPostInitial"; "ticksPreTerminal": "ticksPreTerminal"; "labelInterval": "labelInterval"; "labelExtent": "labelExtent"; "labelsPostInitial": "labelsPostInitial"; "labelsPreTerminal": "labelsPreTerminal"; "minorTickCount": "minorTickCount"; "tickStartExtent": "tickStartExtent"; "tickEndExtent": "tickEndExtent"; "tickStrokeThickness": "tickStrokeThickness"; "tickBrush": "tickBrush"; "fontBrush": "fontBrush"; "valueBrush": "valueBrush"; "valueOutline": "valueOutline"; "valueStrokeThickness": "valueStrokeThickness"; "minorTickStartExtent": "minorTickStartExtent"; "minorTickEndExtent": "minorTickEndExtent"; "minorTickStrokeThickness": "minorTickStrokeThickness"; "minorTickBrush": "minorTickBrush"; "isScaleInverted": "isScaleInverted"; "backingBrush": "backingBrush"; "backingOutline": "backingOutline"; "backingStrokeThickness": "backingStrokeThickness"; "backingInnerExtent": "backingInnerExtent"; "backingOuterExtent": "backingOuterExtent"; "scaleStartExtent": "scaleStartExtent"; "scaleEndExtent": "scaleEndExtent"; "targetValueBrush": "targetValueBrush"; "targetValueBreadth": "targetValueBreadth"; "targetValueInnerExtent": "targetValueInnerExtent"; "targetValueOuterExtent": "targetValueOuterExtent"; "targetValueOutline": "targetValueOutline"; "targetValueStrokeThickness": "targetValueStrokeThickness"; "mergeViewports": "mergeViewports"; "labelFormat": "labelFormat"; "labelFormatSpecifiers": "labelFormatSpecifiers"; "transitionDuration": "transitionDuration"; "showToolTipTimeout": "showToolTipTimeout"; "showToolTip": "showToolTip"; "font": "font"; "pixelScalingRatio": "pixelScalingRatio"; "actualPixelScalingRatio": "actualPixelScalingRatio"; }, { "formatLabel": "formatLabel"; "alignLabel": "alignLabel"; "actualMinimumValueChange": "actualMinimumValueChange"; "actualMaximumValueChange": "actualMaximumValueChange"; }, ["contentRanges"], never>;
}