UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

552 lines (550 loc) 26.9 kB
import { OnDestroy, ViewContainerRef, Injector, ComponentFactoryResolver, AfterContentInit, AfterViewInit, Renderer2, NgZone } from '@angular/core'; import { CategoryChart } from './CategoryChart'; import { CategoryChartType } from './CategoryChartType'; import { CategorySeriesMarkerCollisionAvoidance } from './CategorySeriesMarkerCollisionAvoidance'; import { CategoryTransitionInMode } from './CategoryTransitionInMode'; import { TransitionInSpeedType } from './TransitionInSpeedType'; import { IgxXYChartComponent } from './igx-xy-chart-component'; import { DataSeriesType } from "igniteui-angular-core"; import { DomainType } from "./DomainType"; import { AxisRangeBufferMode } from './AxisRangeBufferMode'; import { AutoMarginsAndAngleUpdateMode } from './AutoMarginsAndAngleUpdateMode'; import * as i0 from "@angular/core"; /** * Represents a chart with an ordinal X-axis and a numeric Y-axis. * * **Ignite UI for Angular Category Chart** - [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/CategoryChart.html) * * The Ignite UI Category Chart is a lightweight, highly performant chart. It can be easily configured to display category data using an extremely simple and intuitive API. All you need to do is provide your data to the chart and it will take care of everything else. * * Example: * * ```html * <igx-category-chart * [dataSource]="data" > * </igx-category-chart> * ``` */ export declare class IgxCategoryChartComponent extends IgxXYChartComponent implements AfterContentInit, AfterViewInit, OnDestroy { private renderer; private _elRef; private ngZone; private injector; private componentFactoryResolver; container: Element; _dynamicContent: ViewContainerRef; private _height; private _width; set height(value: string); get height(): string; set width(value: string); get width(): string; constructor(renderer: Renderer2, _elRef: ViewContainerRef, ngZone: NgZone, injector: Injector, componentFactoryResolver: ComponentFactoryResolver); ngOnDestroy(): void; private _wrapper; protected createImplementation(): CategoryChart; get i(): CategoryChart; protected createSeriesComponent(type: string): any; protected createSeries(type: DataSeriesType): any; private _chart; private _dataSource; set dataSource(value: Array<any>); get dataSource(): Array<any>; bindData(): void; private _defaultTooltips; ngAfterContentInit(): void; ngAfterViewInit(): void; updateStyle(): void; private createTooltip; private _ensureTooltipCreated; private _createXAxis; private _createYAxis; private _ensureDefaultTooltip; private _onDefaultTooltipsReady; /** * Gets or sets the duration used for animating series plots when the chart is loading into view * * `TransitionInDuration` controls the length of time taken by the transition-in animation. Try setting it to 2 seconds: * * ```html * <igx-category-chart * [dataSource]="data" * isTransitionInEnabled="true" * transitionInDuration="2000"> * </igx-category-chart> * ``` */ get transitionInDuration(): number; set transitionInDuration(v: number); static ngAcceptInputType_transitionInDuration: number | string; /** * Gets or sets the duration used for animating series plots when the series is leaving view */ get transitionOutDuration(): number; set transitionOutDuration(v: number); static ngAcceptInputType_transitionOutDuration: number | string; /** * Gets or sets the easing function used for animating series plots when the chart is loading into view * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. */ get transitionInEasingFunction(): (time: number) => number; set transitionInEasingFunction(v: (time: number) => number); /** * Gets or sets the easing function used for animating series plots when the chart is loading into view * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. */ get transitionOutEasingFunction(): (time: number) => number; set transitionOutEasingFunction(v: (time: number) => number); /** * Gets domain type of this chart */ get domainType(): DomainType; static ngAcceptInputType_domainType: DomainType | string; /** * Gets or sets the type of chart series to generate from the data. * * The `ChartType` property determines the type of data series to display. * * ```html * <igx-category-chart * [dataSource]="data" * chartType="stepArea"> * </igx-category-chart> * ``` */ get chartType(): CategoryChartType; set chartType(v: CategoryChartType); static ngAcceptInputType_chartType: CategoryChartType | string; /** * Gets or sets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. * * `MarkerCollisionAvoidance` controls the technique the chart uses to avoid overlapping markers. * * ```html * <igx-category-chart * [dataSource]="data" * markerCollisionAvoidance="none"> * </igx-category-chart> * ``` */ get markerCollisionAvoidance(): CategorySeriesMarkerCollisionAvoidance; set markerCollisionAvoidance(v: CategorySeriesMarkerCollisionAvoidance); static ngAcceptInputType_markerCollisionAvoidance: CategorySeriesMarkerCollisionAvoidance | string; /** * Gets or sets whether to include the spline shape in the axis range requested of the axis for spline type series. */ get isSplineShapePartOfRange(): boolean; set isSplineShapePartOfRange(v: boolean); static ngAcceptInputType_isSplineShapePartOfRange: boolean | string; /** * Gets or sets whether animation of series plots is enabled when the chart is loading into view * * Set `IsTransitionInEnabled` to true if you want your chart series to animate into position when the chart is loading into view. * * ```html * <igx-category-chart * [dataSource]="data" * isTransitionInEnabled="true"> * </igx-category-chart> * ``` */ get isTransitionInEnabled(): boolean; set isTransitionInEnabled(v: boolean); static ngAcceptInputType_isTransitionInEnabled: boolean | string; /** * Gets or sets the method that determines how to animate series plots when the chart is loading into view * * `TransitionInMode` controls the direction of the transition-in animation. * * ```html * <igx-category-chart * [dataSource]="data" * isTransitionInEnabled="true" * transitionInMode="accordionfromRight"> * </igx-category-chart> * ``` */ get transitionInMode(): CategoryTransitionInMode; set transitionInMode(v: CategoryTransitionInMode); static ngAcceptInputType_transitionInMode: CategoryTransitionInMode | string; /** * Gets or sets the arrival speed used for animating series plots when the chart is loading into view * * `TransitionInSpeedType` controls the speed of the transition-in animation. * * ```html * <igx-category-chart * [dataSource]="data" * isTransitionInEnabled="true" * transitionInSpeedType="indexScaled"> * </igx-category-chart> * ``` */ get transitionInSpeedType(): TransitionInSpeedType; set transitionInSpeedType(v: TransitionInSpeedType); static ngAcceptInputType_transitionInSpeedType: TransitionInSpeedType | string; /** * Gets or sets the frequency of displayed labels along the X-axis. * Gets or sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. * * `XAxisInterval` determines how often to show a label, tickmark, and/or gridline along the x-axis. Set this property to _n_ to display a label every _nth_ item. * * ```html * <igx-category-chart * [dataSource]="data" * xAxisInterval="3"> * </igx-category-chart> * ``` */ get xAxisInterval(): number; set xAxisInterval(v: number); static ngAcceptInputType_xAxisInterval: number | string; /** * Gets or sets the frequency of displayed minor lines along the X-axis. * Gets or sets the set value is a factor that determines how the minor lines will be displayed. * * `XAxisMinorInterval` determines how often to show a minor gridline along the x-axis. This property is relevant only when the displayed series is a type with grouping, like column series. * * `XAxisMinorInterval` is expressed as a number between 0 and 1, representing the frequency of the interval. To display minor gridlines representing 10ths of an item width, set `XAxisMinorInterval` to 0.1. * * ```html * <igx-category-chart * [dataSource]="data" * xAxisMinorInterval="0.1" * xAxisMinorStroke="green" * xAxisMinorStrokeThickness="1"> * </igx-category-chart> * ``` */ get xAxisMinorInterval(): number; set xAxisMinorInterval(v: number); static ngAcceptInputType_xAxisMinorInterval: number | string; /** * Gets or sets the amount of space between adjacent categories for the X-axis. * The gap is silently clamped to the range [0, 1] when used. * * Use the `XAxisGap` property to configure the spacing between items on the x-axis. This property is relevant only when the displayed series is a type with item spacing, like column series. * * An `XAxisGap` of 0 allocates no space between items. An `XAxisGap` of 1 allocates a space between items equal to the width of one item. * * To set the item spacing to 75% the width of one item, set the `XAxisGap` to 0.75, as in this code: * * ```html * <igx-category-chart * [dataSource]="data" * xAxisGap="0.75"> * </igx-category-chart> * ``` */ get xAxisGap(): number; set xAxisGap(v: number); static ngAcceptInputType_xAxisGap: number | string; /** * Gets or sets the minimum amount of pixels to use for the gap between categories, if possible. */ get xAxisMinimumGapSize(): number; set xAxisMinimumGapSize(v: number); static ngAcceptInputType_xAxisMinimumGapSize: number | string; /** * Gets or sets the maximum gap value to allow. This defaults to 1.0. */ get xAxisMaximumGap(): number; set xAxisMaximumGap(v: number); static ngAcceptInputType_xAxisMaximumGap: number | string; /** * Gets or sets the amount of overlap between adjacent categories for the X-axis. * Gets or sets the overlap is silently clamped to the range [-1, 1] when used. * * Use the `XAxisOverlap` property to configure the spacing between items on the x-axis. This property is relevant only when the displayed series is a type with item spacing, like column series. * * An `XAxisOverlap` of 0 places grouped items adjacent to each other. An `XAxisOverlap` of 1 places grouped items in the same axis space, completely overlapping. An `XAxisOverlap` of -1 places a space between grouped items equal to the width of one item. * * To place grouped items with 75% overlap, set the `XAxisOverlap` to 0.75, as in this code: * * ```html * <igx-category-chart * [dataSource]="data" * xAxisOverlap="0.75"> * </igx-category-chart> * ``` */ get xAxisOverlap(): number; set xAxisOverlap(v: number); static ngAcceptInputType_xAxisOverlap: number | string; /** * Gets or sets the distance between each label and grid line along the Y-axis. * * `YAxisInterval` determines how often to show a label, tickmark, and/or gridline along the y-axis. Set this property to a number less than the numeric range of the y-axis. * * ```html * <igx-category-chart * [dataSource]="data" * yAxisInterval="10"> * </igx-category-chart> * ``` */ get yAxisInterval(): number; set yAxisInterval(v: number); static ngAcceptInputType_yAxisInterval: number | string; /** * Gets or sets a whether the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get autoMarginAndAngleUpdateMode(): AutoMarginsAndAngleUpdateMode; set autoMarginAndAngleUpdateMode(v: AutoMarginsAndAngleUpdateMode); static ngAcceptInputType_autoMarginAndAngleUpdateMode: AutoMarginsAndAngleUpdateMode | string; /** * Gets or sets a whether the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get shouldAutoExpandMarginForInitialLabels(): boolean; set shouldAutoExpandMarginForInitialLabels(v: boolean); static ngAcceptInputType_shouldAutoExpandMarginForInitialLabels: boolean | string; /** * Gets or sets a whether the series viewer should consider auto rotating labels to fit them in the initial view. This implies that ShouldAutoExpandMarginForInitialLabels is true. */ get shouldConsiderAutoRotationForInitialLabels(): boolean; set shouldConsiderAutoRotationForInitialLabels(v: boolean); static ngAcceptInputType_shouldConsiderAutoRotationForInitialLabels: boolean | string; /** * Gets or sets the extra amount the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get autoExpandMarginExtraPadding(): number; set autoExpandMarginExtraPadding(v: number); static ngAcceptInputType_autoExpandMarginExtraPadding: number | string; /** * Gets or sets the maximum amount the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get autoExpandMarginMaximumValue(): number; set autoExpandMarginMaximumValue(v: number); static ngAcceptInputType_autoExpandMarginMaximumValue: number | string; /** * Gets or sets whether the axis should favor emitting a label at the end of the scale. */ get yAxisFavorLabellingScaleEnd(): boolean; set yAxisFavorLabellingScaleEnd(v: boolean); static ngAcceptInputType_yAxisFavorLabellingScaleEnd: boolean | string; /** * Gets or sets whether the x axis enhanced interval management should prefer to show all the labels if possible without collisions for supported types of category axes. This is for use with EnhancedIntervalMinimumCharacters = -1 and axes that have an integral interval. */ get xAxisEnhancedIntervalPreferMoreCategoryLabels(): boolean; set xAxisEnhancedIntervalPreferMoreCategoryLabels(v: boolean); static ngAcceptInputType_xAxisEnhancedIntervalPreferMoreCategoryLabels: boolean | string; /** * Gets or sets whether the y axis enhanced interval management should prefer to show all the labels if possible without collisions for supported types of category axes. This is for use with EnhancedIntervalMinimumCharacters = -1 and axes that have an integral interval. */ get yAxisEnhancedIntervalPreferMoreCategoryLabels(): boolean; set yAxisEnhancedIntervalPreferMoreCategoryLabels(v: boolean); static ngAcceptInputType_yAxisEnhancedIntervalPreferMoreCategoryLabels: boolean | string; /** * Gets or sets how the numeric axis will adjust its range buffer to less closely fix the data from the series. */ get yAxisAutoRangeBufferMode(): AxisRangeBufferMode; set yAxisAutoRangeBufferMode(v: AxisRangeBufferMode); static ngAcceptInputType_yAxisAutoRangeBufferMode: AxisRangeBufferMode | string; /** * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one. * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. * * Set `YAxisIsLogarithmic` to true if you want the y-axis to be a logarithmic scale. * * ```html * <igx-category-chart * [dataSource]="data" * yAxisIsLogarithmic="true"> * </igx-category-chart> * ``` */ get yAxisIsLogarithmic(): boolean; set yAxisIsLogarithmic(v: boolean); static ngAcceptInputType_yAxisIsLogarithmic: boolean | string; /** * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis. * This property is effective only when YAxisIsLogarithmic is true. * * When `YAxisIsLogarithmic` is true, `YAxisLogarithmBase` sets the logarithm base of the y-axis scale. * * ```html * <igx-category-chart * [dataSource]="data" * yAxisIsLogarithmic="true" * yAxisLogarithmBase="2"> * </igx-category-chart> * ``` */ get yAxisLogarithmBase(): number; set yAxisLogarithmBase(v: number); static ngAcceptInputType_yAxisLogarithmBase: number | string; /** * Gets or sets the data value corresponding to the minimum value of the Y-axis. * * `YAxisMaximumValue` determines the minimum of the y-axis. * * ```html * <igx-category-chart * [dataSource]="data" * yAxisMinimumValue="42"> * </igx-category-chart> * ``` */ get yAxisMinimumValue(): number; set yAxisMinimumValue(v: number); static ngAcceptInputType_yAxisMinimumValue: number | string; /** * Gets or sets the data value corresponding to the maximum value of the Y-axis. * * `YAxisMaximumValue` determines the maximum of the y-axis. * * ```html * <igx-category-chart * [dataSource]="data" * yAxisMaximumValue="42"> * </igx-category-chart> * ``` */ get yAxisMaximumValue(): number; set yAxisMaximumValue(v: number); static ngAcceptInputType_yAxisMaximumValue: number | string; /** * Gets or sets the frequency of displayed minor lines along the Y-axis. * * `YAxisMinorInterval` determines how often to show a minor gridline along the y-axis. Set this property to a number less than the y-axis interval. * * ```html * <igx-category-chart * [dataSource]="data" * yAxisMinorInterval="2" * yAxisMinorStroke="green" * yAxisMinorStrokeThickness="1"> * </igx-category-chart> * ``` */ get yAxisMinorInterval(): number; set yAxisMinorInterval(v: number); static ngAcceptInputType_yAxisMinorInterval: number | string; /** * Gets the current minimum value for the X-axis. */ get xAxisActualMinimum(): number; static ngAcceptInputType_xAxisActualMinimum: number | string; /** * Gets the current maximum value for the X-axis. */ get xAxisActualMaximum(): number; static ngAcceptInputType_xAxisActualMaximum: number | string; /** * Gets the current minimum value for the Y-axis. */ get yAxisActualMinimum(): number; static ngAcceptInputType_yAxisActualMinimum: number | string; /** * Gets the current maximum value for the Y-axis. */ get yAxisActualMaximum(): number; static ngAcceptInputType_yAxisActualMaximum: number | string; /** * Gets or sets the palette used for coloring negative items of Waterfall chart type. * * `NegativeBrushes` controls the brushes used by the chart for negative data, when the `ChartType` is one that supports negative brushes. * * ```html * <igx-category-chart * [dataSource]="data" * chartType="waterfall" * negativeBrushes="#ff0000, #cc0000, #aa0000"> * </igx-category-chart> * ``` */ get negativeBrushes(): string[]; set negativeBrushes(v: string[]); static ngAcceptInputType_negativeBrushes: string[] | string; /** * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. * * `NegativeOutlines` controls the outlines used by the chart for negative data, when the `ChartType` is one that supports negative brushes. * * ```html * <igx-category-chart * [dataSource]="data" * chartType="waterfall" * negativeOutlines="#0000ff, #0000cc, #0000aa"> * </igx-category-chart> * ``` */ get negativeOutlines(): string[]; set negativeOutlines(v: string[]); static ngAcceptInputType_negativeOutlines: string[] | string; /** * Gets or sets whether the large numbers on the Y-axis labels are abbreviated. * * To abbreviate on the y-axis using formats like "1K" or "1M," set `YAxisAbbreviateLargeNumbers` to true. * * ```html * <igx-category-chart * [dataSource]="data" * yAxisAbbreviateLargeNumbers="true"> * </igx-category-chart> * ``` */ get yAxisAbbreviateLargeNumbers(): boolean; set yAxisAbbreviateLargeNumbers(v: boolean); static ngAcceptInputType_yAxisAbbreviateLargeNumbers: boolean | string; /** * Gets or sets number of visible categories at maximum zooming level * This property is overridden by chart's WindowRectMinWidth property */ get xAxisZoomMaximumCategoryRange(): number; set xAxisZoomMaximumCategoryRange(v: number); static ngAcceptInputType_xAxisZoomMaximumCategoryRange: number | string; /** * Gets or sets maximum pixel span of series item that will be visible at maximum zooming level * This property ensures that series item does not get stretch above specified value. * This property is overridden by chart's WindowRectMinWidth property */ get xAxisZoomMaximumItemSpan(): number; set xAxisZoomMaximumItemSpan(v: number); static ngAcceptInputType_xAxisZoomMaximumItemSpan: number | string; /** * Gets or sets number of categories that the chart will zoom in and fill plot area * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get xAxisZoomToCategoryRange(): number; set xAxisZoomToCategoryRange(v: number); static ngAcceptInputType_xAxisZoomToCategoryRange: number | string; /** * Gets or sets starting category that chart will move its zoom window. Acceptable value is between 0 and number of data items * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get xAxisZoomToCategoryStart(): number; set xAxisZoomToCategoryStart(v: number); static ngAcceptInputType_xAxisZoomToCategoryStart: number | string; /** * Gets or sets pixel span of series item that will be used to zoom chart such that the item has desired span * Chart will automatically zoom in until series item has specified pixel span. * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get xAxisZoomToItemSpan(): number; set xAxisZoomToItemSpan(v: number); static ngAcceptInputType_xAxisZoomToItemSpan: number | string; /** * Gets or sets whether the category should be highlighted when hovered */ get isCategoryHighlightingEnabled(): boolean; set isCategoryHighlightingEnabled(v: boolean); static ngAcceptInputType_isCategoryHighlightingEnabled: boolean | string; /** * Gets or sets whether the item should be highlighted when hovered */ get isItemHighlightingEnabled(): boolean; set isItemHighlightingEnabled(v: boolean); static ngAcceptInputType_isItemHighlightingEnabled: boolean | string; /** * Export serialized visual data. */ exportSerializedVisualData(): string; recalculateMarginAutoExpansion(): void; getCurrentXAxisActualMinimum(): number; getCurrentYAxisActualMinimum(): number; getCurrentXAxisActualMaximum(): number; getCurrentYAxisActualMaximum(): number; static ɵfac: i0.ɵɵFactoryDeclaration<IgxCategoryChartComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<IgxCategoryChartComponent, "igx-category-chart", never, { "height": "height"; "width": "width"; "dataSource": "dataSource"; "transitionInDuration": "transitionInDuration"; "transitionOutDuration": "transitionOutDuration"; "transitionInEasingFunction": "transitionInEasingFunction"; "transitionOutEasingFunction": "transitionOutEasingFunction"; "chartType": "chartType"; "markerCollisionAvoidance": "markerCollisionAvoidance"; "isSplineShapePartOfRange": "isSplineShapePartOfRange"; "isTransitionInEnabled": "isTransitionInEnabled"; "transitionInMode": "transitionInMode"; "transitionInSpeedType": "transitionInSpeedType"; "xAxisInterval": "xAxisInterval"; "xAxisMinorInterval": "xAxisMinorInterval"; "xAxisGap": "xAxisGap"; "xAxisMinimumGapSize": "xAxisMinimumGapSize"; "xAxisMaximumGap": "xAxisMaximumGap"; "xAxisOverlap": "xAxisOverlap"; "yAxisInterval": "yAxisInterval"; "autoMarginAndAngleUpdateMode": "autoMarginAndAngleUpdateMode"; "shouldAutoExpandMarginForInitialLabels": "shouldAutoExpandMarginForInitialLabels"; "shouldConsiderAutoRotationForInitialLabels": "shouldConsiderAutoRotationForInitialLabels"; "autoExpandMarginExtraPadding": "autoExpandMarginExtraPadding"; "autoExpandMarginMaximumValue": "autoExpandMarginMaximumValue"; "yAxisFavorLabellingScaleEnd": "yAxisFavorLabellingScaleEnd"; "xAxisEnhancedIntervalPreferMoreCategoryLabels": "xAxisEnhancedIntervalPreferMoreCategoryLabels"; "yAxisEnhancedIntervalPreferMoreCategoryLabels": "yAxisEnhancedIntervalPreferMoreCategoryLabels"; "yAxisAutoRangeBufferMode": "yAxisAutoRangeBufferMode"; "yAxisIsLogarithmic": "yAxisIsLogarithmic"; "yAxisLogarithmBase": "yAxisLogarithmBase"; "yAxisMinimumValue": "yAxisMinimumValue"; "yAxisMaximumValue": "yAxisMaximumValue"; "yAxisMinorInterval": "yAxisMinorInterval"; "negativeBrushes": "negativeBrushes"; "negativeOutlines": "negativeOutlines"; "yAxisAbbreviateLargeNumbers": "yAxisAbbreviateLargeNumbers"; "xAxisZoomMaximumCategoryRange": "xAxisZoomMaximumCategoryRange"; "xAxisZoomMaximumItemSpan": "xAxisZoomMaximumItemSpan"; "xAxisZoomToCategoryRange": "xAxisZoomToCategoryRange"; "xAxisZoomToCategoryStart": "xAxisZoomToCategoryStart"; "xAxisZoomToItemSpan": "xAxisZoomToItemSpan"; "isCategoryHighlightingEnabled": "isCategoryHighlightingEnabled"; "isItemHighlightingEnabled": "isItemHighlightingEnabled"; }, {}, never, never>; }