UNPKG

igniteui-angular-charts

Version:

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

1,210 lines (1,208 loc) 49.3 kB
import { __extends } from "tslib"; import { Component, ViewContainerRef, ViewChild, Input, ChangeDetectionStrategy } from '@angular/core'; import { AngularRenderer, AngularWrapper } from "igniteui-angular-core"; import { TypeRegistrar } from "igniteui-angular-core"; import { CategoryChart } from './CategoryChart'; import { CategoryChartType_$type } from './CategoryChartType'; import { CategorySeriesMarkerCollisionAvoidance_$type } from './CategorySeriesMarkerCollisionAvoidance'; import { CategoryTransitionInMode_$type } from './CategoryTransitionInMode'; import { TransitionInSpeedType_$type } from './TransitionInSpeedType'; import { fromBrushCollection, toBrushCollection, ensureEnum, ensureBool, NamePatcher } from "igniteui-angular-core"; import { IgxXYChartComponent } from './igx-xy-chart-component'; import { DataChartStylingDefaults } from './DataChartStylingDefaults'; import { DataSeriesType } from "igniteui-angular-core"; import { IgxDataContext } from "igniteui-angular-core"; import { IgxCategoryXAxisComponent } from './igx-category-x-axis-component'; import { IgxNumericYAxisComponent } from './igx-numeric-y-axis-component'; import { AxisRangeBufferMode_$type } from './AxisRangeBufferMode'; import { AutoMarginsAndAngleUpdateMode_$type } 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> * ``` */ var IgxCategoryChartComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxCategoryChartComponent, _super); function IgxCategoryChartComponent(renderer, _elRef, ngZone, injector, componentFactoryResolver) { var _this = _super.call(this) || this; _this.renderer = renderer; _this._elRef = _elRef; _this.ngZone = ngZone; _this.injector = injector; _this.componentFactoryResolver = componentFactoryResolver; _this._dataSource = null; _this._defaultTooltips = null; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this._zoneRunner = function (act) { return ngZone.run(act); }; _this.container = renderer.createElement("div"); renderer.appendChild(_elRef.element.nativeElement, _this.container); renderer.setStyle(_this.container, "display", "block"); renderer.setStyle(_this.container, "width", "100%"); renderer.setStyle(_this.container, "height", "100%"); var root; root = _this.container; if (_this.container != null) { root = _this.container; } var ren = new AngularRenderer(root, _this.renderer, window.document, _this.ngZone, true, DataChartStylingDefaults); _this._wrapper = ren; var chart = _this.i; _this._chart = chart; if (chart.xAxis) { var x = new IgxCategoryXAxisComponent(); x._provideRenderer(ren); x._implementation = chart.xAxis; chart.xAxis.externalObject = x; } if (chart.yAxis) { var y = new IgxNumericYAxisComponent(); y._provideRenderer(ren); y._implementation = chart.yAxis; chart.yAxis.externalObject = y; } chart.provideContainer(ren); _this.bindData(); chart.notifyResized(); ren.addSizeWatcher(function () { _this._chart.notifyResized(); }); return _this; } Object.defineProperty(IgxCategoryChartComponent.prototype, "height", { get: function () { return this._height; }, set: function (value) { this._height = value; this.renderer.setStyle(this._elRef.element.nativeElement, "height", value); this._chart.notifyResized(); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "width", { get: function () { return this._width; }, set: function (value) { this._width = value; this.renderer.setStyle(this._elRef.element.nativeElement, "width", value); this._chart.notifyResized(); }, enumerable: false, configurable: true }); IgxCategoryChartComponent.prototype.ngOnDestroy = function () { this._chart.destroy(); this._wrapper.destroy(); }; IgxCategoryChartComponent.prototype.createImplementation = function () { return new CategoryChart(); }; Object.defineProperty(IgxCategoryChartComponent.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgxCategoryChartComponent.prototype.createSeriesComponent = function (type) { if (TypeRegistrar.isRegistered(type)) { var s = TypeRegistrar.create(type); s.owner = this; s._provideRenderer(this.renderer); return s; } else { //we shouldn't get here, hopefully. throw Error("series type not loaded: " + type); } }; IgxCategoryChartComponent.prototype.createSeries = function (type) { switch (type) { case DataSeriesType.Area: return this.createSeriesComponent('IgxAreaSeriesComponent'); case DataSeriesType.Column: return this.createSeriesComponent('IgxColumnSeriesComponent'); case DataSeriesType.Line: return this.createSeriesComponent('IgxLineSeriesComponent'); case DataSeriesType.Point: return this.createSeriesComponent('IgxPointSeriesComponent'); case DataSeriesType.Spline: return this.createSeriesComponent('IgxSplineSeriesComponent'); case DataSeriesType.SplineArea: return this.createSeriesComponent('IgxSplineAreaSeriesComponent'); case DataSeriesType.StepArea: return this.createSeriesComponent('IgxStepAreaSeriesComponent'); case DataSeriesType.StepLine: return this.createSeriesComponent('IgxStepLineSeriesComponent'); case DataSeriesType.Waterfall: return this.createSeriesComponent('IgxWaterfallSeriesComponent'); case DataSeriesType.ItemToolTipLayer: return this.createSeriesComponent('IgxItemToolTipLayerComponent'); case DataSeriesType.CategoryToolTipLayer: return this.createSeriesComponent('IgxCategoryToolTipLayerComponent'); case DataSeriesType.CrosshairLayer: return this.createSeriesComponent('IgxCrosshairLayerComponent'); case DataSeriesType.FinalValueLayer: return this.createSeriesComponent('IgxFinalValueLayerComponent'); case DataSeriesType.CalloutLayer: return this.createSeriesComponent('IgxCalloutLayerComponent'); case DataSeriesType.CategoryHighlightLayer: return this.createSeriesComponent('IgxCategoryHighlightLayerComponent'); case DataSeriesType.CategoryItemHighlightLayer: return this.createSeriesComponent('IgxCategoryItemHighlightLayerComponent'); case DataSeriesType.DataToolTipLayer: return this.createSeriesComponent('IgxDataToolTipLayerComponent'); case DataSeriesType.ValueLayer: return this.createSeriesComponent('IgxValueLayerComponent'); default: return this.createSeriesComponent('IgxColumnSeriesComponent'); } }; Object.defineProperty(IgxCategoryChartComponent.prototype, "dataSource", { get: function () { return this._dataSource; }, set: function (value) { this._dataSource = value; this.bindData(); }, enumerable: false, configurable: true }); IgxCategoryChartComponent.prototype.bindData = function () { if (this._chart != null && this._chart !== undefined) { this._chart.itemsSource = this._dataSource; } }; IgxCategoryChartComponent.prototype.ngAfterContentInit = function () { var _this = this; if (TypeRegistrar.isRegistered("IgxDataChartDefaultTooltipsComponent")) { var c = TypeRegistrar.get("IgxDataChartDefaultTooltipsComponent"); var cf = this.componentFactoryResolver.resolveComponentFactory(c); //let cr = cf.create(this.injector); var cr_1 = this._dynamicContent.createComponent(cf); this._defaultTooltips = cr_1; cr_1.instance.onContentReady.subscribe(function () { _this._onDefaultTooltipsReady(cr_1); }); this.container.appendChild(cr_1.location.nativeElement); } }; IgxCategoryChartComponent.prototype.ngAfterViewInit = function () { this.updateStyle(); }; IgxCategoryChartComponent.prototype.updateStyle = function () { this._styling(this.container, this); }; IgxCategoryChartComponent.prototype.createTooltip = function () { if (!TypeRegistrar.isRegistered("IgxTooltipContainerComponent")) { return null; } var t = TypeRegistrar.get("IgxTooltipContainerComponent"); var cf = this.componentFactoryResolver.resolveComponentFactory(t); //let cr = cf.create(this.injector); var cr = this._dynamicContent.createComponent(cf); var ele = cr.location.nativeElement; var self = this; ele.updateToolTip = function (c, isSubContent) { if (c.externalObject) { c = c.externalObject; } else { var ext = new IgxDataContext(); ext._implementation = c; c = ext; } if (!isSubContent) { if (ele.parentElement != self.container) { if (ele.parentElement != null) { ele.parentElement.removeChild(ele); } self.container.appendChild(ele); } } else { c.isSubContent = true; } cr.instance.context = c; ele.style.display = "block"; return true; }; ele.hideToolTip = function () { ele.style.display = "none"; }; ele.style.display = "none"; return cr; }; IgxCategoryChartComponent.prototype._ensureTooltipCreated = function (series) { var _this = this; series._ensureTooltipCreated(function () { return _this.createTooltip(); }, function (ele) { var wrapper = new AngularWrapper(ele, _this.renderer, _this.ngZone); wrapper.updateToolTip = ele.updateToolTip; wrapper.hideToolTip = ele.hideToolTip; return wrapper; }); }; IgxCategoryChartComponent.prototype._createXAxis = function () { var x = new IgxCategoryXAxisComponent(); x._provideRenderer(this.renderer); return x.i; }; IgxCategoryChartComponent.prototype._createYAxis = function () { var y = new IgxNumericYAxisComponent(); y.provideRenderer(this.renderer); return y.i; }; IgxCategoryChartComponent.prototype._ensureDefaultTooltip = function (series) { if (this._defaultTooltips == null) { return; } this._defaultTooltips.instance["ensureDefaultTooltip"](series); }; IgxCategoryChartComponent.prototype._onDefaultTooltipsReady = function (cr) { if (this.i.dataChart) { var currSeries = this.i.dataChart.series; for (var i = 0; i < currSeries.count; i++) { if (currSeries.item(i).externalObject.showDefaultTooltip) { this._ensureDefaultTooltip(currSeries.item(i).externalObject); } } } }; Object.defineProperty(IgxCategoryChartComponent.prototype, "transitionInDuration", { /** * 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: function () { return this.i.ajn; }, set: function (v) { this.i.ajn = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "transitionOutDuration", { /** * Gets or sets the duration used for animating series plots when the series is leaving view */ get: function () { return this.i.ajo; }, set: function (v) { this.i.ajo = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "transitionInEasingFunction", { /** * 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: function () { return this.i.ahp; }, set: function (v) { this.i.ahp = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "transitionOutEasingFunction", { /** * 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: function () { return this.i.ahq; }, set: function (v) { this.i.ahq = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "domainType", { /** * Gets domain type of this chart */ get: function () { return this.i.cb; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "chartType", { /** * 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: function () { return this.i.ag8; }, set: function (v) { this.i.ag8 = ensureEnum(CategoryChartType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "markerCollisionAvoidance", { /** * 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: function () { return this.i.aha; }, set: function (v) { this.i.aha = ensureEnum(CategorySeriesMarkerCollisionAvoidance_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "isSplineShapePartOfRange", { /** * Gets or sets whether to include the spline shape in the axis range requested of the axis for spline type series. */ get: function () { return this.i.ah4; }, set: function (v) { this.i.ah4 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "isTransitionInEnabled", { /** * 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: function () { return this.i.ah5; }, set: function (v) { this.i.ah5 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "transitionInMode", { /** * 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: function () { return this.i.ahc; }, set: function (v) { this.i.ahc = ensureEnum(CategoryTransitionInMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "transitionInSpeedType", { /** * 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: function () { return this.i.ahm; }, set: function (v) { this.i.ahm = ensureEnum(TransitionInSpeedType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisInterval", { /** * 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: function () { return this.i.ai4; }, set: function (v) { this.i.ai4 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisMinorInterval", { /** * 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: function () { return this.i.ai7; }, set: function (v) { this.i.ai7 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisGap", { /** * 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: function () { return this.i.ai3; }, set: function (v) { this.i.ai3 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisMinimumGapSize", { /** * Gets or sets the minimum amount of pixels to use for the gap between categories, if possible. */ get: function () { return this.i.ai6; }, set: function (v) { this.i.ai6 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisMaximumGap", { /** * Gets or sets the maximum gap value to allow. This defaults to 1.0. */ get: function () { return this.i.ai5; }, set: function (v) { this.i.ai5 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisOverlap", { /** * 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: function () { return this.i.ai8; }, set: function (v) { this.i.ai8 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisInterval", { /** * 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: function () { return this.i.ajg; }, set: function (v) { this.i.ajg = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "autoMarginAndAngleUpdateMode", { /** * Gets or sets a whether the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get: function () { return this.i.ag4; }, set: function (v) { this.i.ag4 = ensureEnum(AutoMarginsAndAngleUpdateMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "shouldAutoExpandMarginForInitialLabels", { /** * Gets or sets a whether the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get: function () { return this.i.ah6; }, set: function (v) { this.i.ah6 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "shouldConsiderAutoRotationForInitialLabels", { /** * 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: function () { return this.i.ah7; }, set: function (v) { this.i.ah7 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "autoExpandMarginExtraPadding", { /** * Gets or sets the extra amount the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get: function () { return this.i.aiv; }, set: function (v) { this.i.aiv = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "autoExpandMarginMaximumValue", { /** * Gets or sets the maximum amount the series viewer should auto expand margins to accommodate the initial horizontal axis labels. */ get: function () { return this.i.aiw; }, set: function (v) { this.i.aiw = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisFavorLabellingScaleEnd", { /** * Gets or sets whether the axis should favor emitting a label at the end of the scale. */ get: function () { return this.i.aib; }, set: function (v) { this.i.aib = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisEnhancedIntervalPreferMoreCategoryLabels", { /** * 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: function () { return this.i.ah8; }, set: function (v) { this.i.ah8 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisEnhancedIntervalPreferMoreCategoryLabels", { /** * 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: function () { return this.i.aia; }, set: function (v) { this.i.aia = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisAutoRangeBufferMode", { /** * Gets or sets how the numeric axis will adjust its range buffer to less closely fix the data from the series. */ get: function () { return this.i.ag6; }, set: function (v) { this.i.ag6 = ensureEnum(AxisRangeBufferMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisIsLogarithmic", { /** * 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: function () { return this.i.aic; }, set: function (v) { this.i.aic = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisLogarithmBase", { /** * 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: function () { return this.i.ajp; }, set: function (v) { this.i.ajp = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisMinimumValue", { /** * 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: function () { return this.i.aji; }, set: function (v) { this.i.aji = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisMaximumValue", { /** * 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: function () { return this.i.ajh; }, set: function (v) { this.i.ajh = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisMinorInterval", { /** * 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: function () { return this.i.ajj; }, set: function (v) { this.i.ajj = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisActualMinimum", { /** * Gets the current minimum value for the X-axis. */ get: function () { return this.i.ai2; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisActualMaximum", { /** * Gets the current maximum value for the X-axis. */ get: function () { return this.i.ai1; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisActualMinimum", { /** * Gets the current minimum value for the Y-axis. */ get: function () { return this.i.ajf; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisActualMaximum", { /** * Gets the current maximum value for the Y-axis. */ get: function () { return this.i.aje; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "negativeBrushes", { /** * 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: function () { return fromBrushCollection(this.i.ag1); }, set: function (v) { this.i.ag1 = toBrushCollection(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "negativeOutlines", { /** * 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: function () { return fromBrushCollection(this.i.ag2); }, set: function (v) { this.i.ag2 = toBrushCollection(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "yAxisAbbreviateLargeNumbers", { /** * 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: function () { return this.i.ah9; }, set: function (v) { this.i.ah9 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisZoomMaximumCategoryRange", { /** * Gets or sets number of visible categories at maximum zooming level * This property is overridden by chart's WindowRectMinWidth property */ get: function () { return this.i.ai9; }, set: function (v) { this.i.ai9 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisZoomMaximumItemSpan", { /** * 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: function () { return this.i.aja; }, set: function (v) { this.i.aja = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisZoomToCategoryRange", { /** * 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: function () { return this.i.ajb; }, set: function (v) { this.i.ajb = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisZoomToCategoryStart", { /** * 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: function () { return this.i.ajc; }, set: function (v) { this.i.ajc = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "xAxisZoomToItemSpan", { /** * 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: function () { return this.i.ajd; }, set: function (v) { this.i.ajd = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "isCategoryHighlightingEnabled", { /** * Gets or sets whether the category should be highlighted when hovered */ get: function () { return this.i.ah2; }, set: function (v) { this.i.ah2 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryChartComponent.prototype, "isItemHighlightingEnabled", { /** * Gets or sets whether the item should be highlighted when hovered */ get: function () { return this.i.ah3; }, set: function (v) { this.i.ah3 = ensureBool(v); }, enumerable: false, configurable: true }); /** * Export serialized visual data. */ IgxCategoryChartComponent.prototype.exportSerializedVisualData = function () { var iv = this.i.aju(); return (iv); }; IgxCategoryChartComponent.prototype.recalculateMarginAutoExpansion = function () { this.i.ak0(); }; IgxCategoryChartComponent.prototype.getCurrentXAxisActualMinimum = function () { var iv = this.i.aiy(); return (iv); }; IgxCategoryChartComponent.prototype.getCurrentYAxisActualMinimum = function () { var iv = this.i.ai0(); return (iv); }; IgxCategoryChartComponent.prototype.getCurrentXAxisActualMaximum = function () { var iv = this.i.aix(); return (iv); }; IgxCategoryChartComponent.prototype.getCurrentYAxisActualMaximum = function () { var iv = this.i.aiz(); return (iv); }; IgxCategoryChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryChartComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component }); IgxCategoryChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxCategoryChartComponent, selector: "igx-category-chart", inputs: { 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" }, host: { classAttribute: "ig-category-chart igx-category-chart" }, providers: [], viewQueries: [{ propertyName: "_dynamicContent", first: true, predicate: ["dynamicContent"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container #dynamicContent></ng-container>", isInline: true, styles: ["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxCategoryChartComponent; }(IgxXYChartComponent)); export { IgxCategoryChartComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryChartComponent, decorators: [{ type: Component, args: [{ selector: 'igx-category-chart', template: "<ng-container #dynamicContent></ng-container>", changeDetection: ChangeDetectionStrategy.OnPush, providers: [], host: { 'class': 'ig-category-chart igx-category-chart' }, styles: ["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"] }] }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { _dynamicContent: [{ type: ViewChild, args: ["dynamicContent", { read: ViewContainerRef, static: true }] }], height: [{ type: Input }], width: [{ type: Input }], dataSource: [{ type: Input }], transitionInDuration: [{ type: Input }], transitionOutDuration: [{ type: Input }], transitionInEasingFunction: [{ type: Input }], transitionOutEasingFunction: [{ type: Input }], chartType: [{ type: Input }], markerCollisionAvoidance: [{ type: Input }], isSplineShapePartOfRange: [{ type: Input }], isTransitionInEnabled: [{ type: Input }], transitionInMode: [{ type: Input }], transitionInSpeedType: [{ type: Input }], xAxisInterval: [{ type: Input }], xAxisMinorInterval: [{ type: Input }], xAxisGap: [{ type: Input }], xAxisMinimumGapSize: [{ type: Input }], xAxisMaximumGap: [{ type: Input }], xAxisOverlap: [{ type: Input }], yAxisInterval: [{ type: Input }], autoMarginAndAngleUpdateMode: [{ type: Input }], shouldAutoExpandMarginForInitialLabels: [{ type: Input }], shouldConsiderAutoRotationForInitialLabels: [{ type: Input }], autoExpandMarginExtraPadding: [{ type: Input }], autoExpandMarginMaximumValue: [{ type: Input }], yAxisFavorLabellingScaleEnd: [{ type: Input }], xAxisEnhancedIntervalPreferMoreCategoryLabels: [{ type: Input }], yAxisEnhancedIntervalPreferMoreCategoryLabels: [{ type: Input }], yAxisAutoRangeBufferMode: [{ type: Input }], yAxisIsLogarithmic: [{ type: Input }], yAxisLogarithmBase: [{ type: Input }], yAxisMinimumValue: [{ type: Input }], yAxisMaximumValue: [{ type: Input }], yAxisMinorInterval: [{ type: Input }], negativeBrushes: [{ type: Input }], negativeOutlines: [{ type: Input }], yAxisAbbreviateLargeNumbers: [{ type: Input }], xAxisZoomMaximumCategoryRange: [{ type: Input }], xAxisZoomMaximumItemSpan: [{ type: Input }], xAxisZoomToCategoryRange: [{ type: Input }], xAxisZoomToCategoryStart: [{ type: Input }], xAxisZoomToItemSpan: [{ type: Input }], isCategoryHighlightingEnabled: [{ type: Input }], isItemHighlightingEnabled: [{ type: Input }] } });