/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Component, ViewChild, Input, ChangeDetectionStrategy, ViewContainerRef } from '@angular/core';
import { AngularRenderer, AngularWrapper } from "igniteui-angular-core";
import { Visibility_$type } from "igniteui-angular-core";
import { TypeRegistrar } from "igniteui-angular-core";
import { XamSparkline } from './XamSparkline';
import { brushToString, stringToBrush, ensureBool, ensureEnum, toSpinal, initializePropertiesFromCss, NamePatcher, arrayFindByName } from "igniteui-angular-core";
import { IgxDataContext } from "igniteui-angular-core";
import { SparklineStylingDefaults } from './SparklineStylingDefaults';
import { TrendLineType_$type } from "igniteui-angular-core";
import { SparklineDisplayType_$type } from './SparklineDisplayType';
import { UnknownValuePlotting_$type } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents a sparkline chart.
*/
var IgxSparklineComponent = /** @class */ /*@__PURE__*/ (function () {
    function IgxSparklineComponent(_renderer, _elRef, _ngZone, _componentFactoryResolver, _injector) {
        //super();
        var _this = this;
        this._renderer = _renderer;
        this._elRef = _elRef;
        this._ngZone = _ngZone;
        this._componentFactoryResolver = _componentFactoryResolver;
        this._injector = _injector;
        this._dataSource = null;
        this._root = null;
        this._zoneRunner = null;
        this._tooltipTemplate = null;
        this._tooltipContent = null;
        this._defaultTooltips = null;
        this.__p = null;
        this._hasUserValues = new Set();
        this._stylingContainer = null;
        this._stylingParent = null;
        this._inStyling = false;
        if (this._styling) {
            NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
        }
        this._zoneRunner = function (act) { return _this._ngZone.run(act); };
        this._implementation = this.createImplementation();
        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.nativeElement != null) {
            root = this._container.nativeElement;
        }
        this._root = root;
        var ren = new AngularRenderer(root, this._renderer, window.document, this._ngZone, true, SparklineStylingDefaults);
        this._wrapper = ren;
        var sparkline = this.i;
        this._sparkline = sparkline;
        sparkline.provideContainer(ren);
        ren.addSizeWatcher(function () {
            _this._sparkline.notifyResized();
        });
    }
    Object.defineProperty(IgxSparklineComponent.prototype, "height", {
        get: function () {
            return this._height;
        },
        set: function (value) {
            this._height = value;
            this._renderer.setStyle(this._elRef.element.nativeElement, "height", value);
            this._sparkline.notifyResized();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "width", {
        get: function () {
            return this._width;
        },
        set: function (value) {
            this._width = value;
            this._renderer.setStyle(this._elRef.element.nativeElement, "width", value);
            this._sparkline.notifyResized();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "dataSource", {
        get: function () {
            if (this._dataSource != null) {
                return this._dataSource;
            }
            return this.i.itemsSource;
        },
        set: function (value) {
            this._dataSource = value;
            this.i.itemsSource = this._dataSource;
            //console.log("setting axis data source: " + value)
        },
        enumerable: false,
        configurable: true
    });
    IgxSparklineComponent.prototype.ngOnDestroy = function () {
        this._sparkline.destroy();
        this._wrapper.destroy();
    };
    IgxSparklineComponent.prototype.createImplementation = function () {
        return new XamSparkline();
    };
    IgxSparklineComponent.prototype.ngAfterContentInit = function () {
        this._styling(this._root, this);
        this.i.notifyResized();
    };
    IgxSparklineComponent.prototype._runInZone = function (act) {
        if (this._zoneRunner != null) {
            this._zoneRunner(act);
        }
        else {
            act();
        }
    };
    Object.defineProperty(IgxSparklineComponent.prototype, "tooltipTemplate", {
        get: function () {
            return this._tooltipTemplate;
        },
        set: function (value) {
            this._tooltipTemplate = value;
            if (value == null) {
                if (this._tooltipContent !== null) {
                    this._tooltipContent.destroy();
                    this._tooltipContent = null;
                }
            }
            if (this._tooltipContent != null) {
                this._tooltipContent.instance.template = this._tooltipTemplate;
            }
            else {
                this._ensureTooltipCreated();
            }
        },
        enumerable: false,
        configurable: true
    });
    IgxSparklineComponent.prototype._ensureTooltipCreated = function () {
        if (this.i.toolTip == null) {
            var tooltip = this.createTooltip();
            if (tooltip == null) {
                return;
            }
            this._tooltipContent = tooltip;
            tooltip.instance.template = this._tooltipTemplate;
            this.i.toolTip = this.createWrapper(tooltip.location.nativeElement);
        }
    };
    IgxSparklineComponent.prototype.createWrapper = function (ele) {
        var wrapper = new AngularWrapper(ele, this._renderer, this._ngZone);
        wrapper.updateToolTip = ele.updateToolTip;
        wrapper.hideToolTip = ele.hideToolTip;
        return wrapper;
    };
    IgxSparklineComponent.prototype._ensureDefaultTooltip = function () {
        if (this._defaultTooltips == null) {
            return;
        }
        this._defaultTooltips.instance["ensureDefaultTooltip"](this);
    };
    IgxSparklineComponent.prototype._onDefaultTooltipsReady = function (cr) {
        this._ensureDefaultTooltip();
    };
    IgxSparklineComponent.prototype.createTooltip = function () {
        if (!TypeRegistrar.isRegistered("IgxTooltipContainerComponent")) {
            return null;
        }
        var t = TypeRegistrar.get("IgxTooltipContainerComponent");
        var cf = this._componentFactoryResolver.resolveComponentFactory(t);
        var cr = this._dynamicContent.createComponent(cf);
        var ele = cr.location.nativeElement;
        var self = this;
        ele.updateToolTip = function (c) {
            if (c.externalObject) {
                c = c.externalObject;
            }
            else {
                var ext = new IgxDataContext();
                ext._implementation = c;
                c = ext;
            }
            if (ele.parentElement != self._container) {
                if (ele.parentElement != null) {
                    ele.parentElement.removeChild(ele);
                }
                self._container.appendChild(ele);
            }
            cr.instance.context = c;
            ele.style.display = "block";
            return true;
        };
        ele.hideToolTip = function () {
            ele.style.display = "none";
        };
        ele.style.display = "none";
        return cr;
    };
    Object.defineProperty(IgxSparklineComponent.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        } /**
                                     * @hidden
                                     */,
        enumerable: false,
        configurable: true
    });
    IgxSparklineComponent._createFromInternal = function (internal) {
        if (!internal) {
            return null;
        }
        if (!internal.$type) {
            return null;
        }
        var name = internal.$type.name;
        var externalName = "Igx" + name + "Component";
        if (!TypeRegistrar.isRegistered(externalName)) {
            return null;
        }
        return TypeRegistrar.create(externalName);
    };
    Object.defineProperty(IgxSparklineComponent.prototype, "brush", {
        /**
     * Gets or sets the sparkline brush.
    */
        get: function () {
            return brushToString(this.i.e8);
        },
        set: function (v) {
            this.i.e8 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeBrush", {
        /**
         * Gets or sets the negative brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.ff);
        },
        set: function (v) {
            this.i.ff = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "markerBrush", {
        /**
         * Gets or sets the marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fe);
        },
        set: function (v) {
            this.i.fe = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeMarkerBrush", {
        /**
         * Gets or sets the negative marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fg);
        },
        set: function (v) {
            this.i.fg = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "firstMarkerBrush", {
        /**
         * Gets or sets the first marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.e9);
        },
        set: function (v) {
            this.i.e9 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lastMarkerBrush", {
        /**
         * Gets or sets the last marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fc);
        },
        set: function (v) {
            this.i.fc = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "highMarkerBrush", {
        /**
         * Gets or sets the high marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fa);
        },
        set: function (v) {
            this.i.fa = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lowMarkerBrush", {
        /**
         * Gets or sets the low marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fd);
        },
        set: function (v) {
            this.i.fd = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLineBrush", {
        /**
         * Gets or sets the trendline brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fi);
        },
        set: function (v) {
            this.i.fi = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "horizontalAxisBrush", {
        /**
         * Gets or sets the horizontal axis line brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fb);
        },
        set: function (v) {
            this.i.fb = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "verticalAxisBrush", {
        /**
         * Gets or sets the vertical axis line brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fj);
        },
        set: function (v) {
            this.i.fj = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeFill", {
        /**
         * Gets or sets the normal range brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.fh);
        },
        set: function (v) {
            this.i.fh = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "horizontalAxisVisibility", {
        /**
         * Gets or sets the display state of the horizontal axis.
        */
        get: function () {
            return this.i.fm;
        },
        set: function (v) {
            this.i.fm = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "verticalAxisVisibility", {
        /**
         * Gets or sets the display state of the vertical axis.
        */
        get: function () {
            return this.i.ft;
        },
        set: function (v) {
            this.i.ft = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "markerVisibility", {
        /**
         * Gets or sets the marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fp;
        },
        set: function (v) {
            this.i.fp = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeMarkerVisibility", {
        /**
         * Gets or sets the negative marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fq;
        },
        set: function (v) {
            this.i.fq = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "firstMarkerVisibility", {
        /**
         * Gets or sets the first marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fk;
        },
        set: function (v) {
            this.i.fk = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lastMarkerVisibility", {
        /**
         * Gets or sets the last marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fn;
        },
        set: function (v) {
            this.i.fn = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lowMarkerVisibility", {
        /**
         * Gets or sets the low marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fo;
        },
        set: function (v) {
            this.i.fo = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "highMarkerVisibility", {
        /**
         * Gets or sets the high marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fl;
        },
        set: function (v) {
            this.i.fl = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeVisibility", {
        /**
         * Gets or sets the normal range visibility of the sparkline.
        */
        get: function () {
            return this.i.fr;
        },
        set: function (v) {
            this.i.fr = ensureEnum(Visibility_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "displayNormalRangeInFront", {
        /**
         * Gets or sets the position of the normal range on the sparkline.
        */
        get: function () {
            return this.i.aw;
        },
        set: function (v) {
            this.i.aw = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "markerSize", {
        /**
         * Gets or sets the marker size of the sparkline.
        */
        get: function () {
            return this.i.bd;
        },
        set: function (v) {
            this.i.bd = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "firstMarkerSize", {
        /**
         * Gets or sets the first marker size of the sparkline.
        */
        get: function () {
            return this.i.a6;
        },
        set: function (v) {
            this.i.a6 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lastMarkerSize", {
        /**
         * Gets or sets the last marker size of the sparkline.
        */
        get: function () {
            return this.i.a8;
        },
        set: function (v) {
            this.i.a8 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "highMarkerSize", {
        /**
         * Gets or sets the high marker size of the sparkline.
        */
        get: function () {
            return this.i.a7;
        },
        set: function (v) {
            this.i.a7 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lowMarkerSize", {
        /**
         * Gets or sets the low marker size of the sparkline.
        */
        get: function () {
            return this.i.bc;
        },
        set: function (v) {
            this.i.bc = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeMarkerSize", {
        /**
         * Gets or sets the negative marker size of the sparkline.
        */
        get: function () {
            return this.i.bi;
        },
        set: function (v) {
            this.i.bi = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lineThickness", {
        /**
         * Gets or sets the line thickness of the sparkline.
        */
        get: function () {
            return this.i.a9;
        },
        set: function (v) {
            this.i.a9 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "minimum", {
        /**
         * Gets or sets the minimum value of the y axis.
        */
        get: function () {
            return this.i.bh;
        },
        set: function (v) {
            this.i.bh = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "maximum", {
        /**
         * Gets or sets the maximum value of the y axis.
        */
        get: function () {
            return this.i.bg;
        },
        set: function (v) {
            this.i.bg = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "valueMemberPath", {
        /**
         * Gets or sets the string path to the value column.
        */
        get: function () {
            return this.i.c9;
        },
        set: function (v) {
            this.i.c9 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "labelMemberPath", {
        /**
         * String identifier of a column or property name to get labels from on each item in the data source.  These labels will be retrieved from the first and last item, and displayed by the horizontal axis.
        */
        get: function () {
            return this.i.ce;
        },
        set: function (v) {
            this.i.ce = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLineType", {
        /**
         * Gets or sets the type of trendline used by the sparkline.
        */
        get: function () {
            return this.i.ar;
        },
        set: function (v) {
            this.i.ar = ensureEnum(TrendLineType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLinePeriod", {
        /**
         * Gets or sets the trendline period used by the sparkline.
        */
        get: function () {
            return this.i.bq;
        },
        set: function (v) {
            this.i.bq = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLineThickness", {
        /**
         * Gets or sets the thickness of the sparkline's trendline.
        */
        get: function () {
            return this.i.bm;
        },
        set: function (v) {
            this.i.bm = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeMinimum", {
        /**
         * Gets or sets the minimum value of the normal range.
        */
        get: function () {
            return this.i.bk;
        },
        set: function (v) {
            this.i.bk = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeMaximum", {
        /**
         * Gets or sets the maximum value of the normal range.
        */
        get: function () {
            return this.i.bj;
        },
        set: function (v) {
            this.i.bj = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "displayType", {
        /**
         * Gets or sets the display type of the sparkline.
        */
        get: function () {
            return this.i.aq;
        },
        set: function (v) {
            this.i.aq = ensureEnum(SparklineDisplayType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "unknownValuePlotting", {
        /**
         * Gets or sets the way null values are interpreted.
        */
        get: function () {
            return this.i.as;
        },
        set: function (v) {
            this.i.as = ensureEnum(UnknownValuePlotting_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "verticalAxisLabel", {
        /**
         * The value or content to display on the vertical axis.
         * This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate.
        */
        get: function () {
            return this.i.bt;
        },
        set: function (v) {
            this.i.bt = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "horizontalAxisLabel", {
        /**
         * The value or content to display on the horizontal axis.
         * This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate.
        */
        get: function () {
            return this.i.br;
        },
        set: function (v) {
            this.i.br = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "formatLabel", {
        /**
         * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart.
        */
        get: function () {
            return this.i.bp;
        },
        set: function (v) {
            this.i.bp = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "horizontalLabelFormat", {
        /**
         * Gets or sets the label composite format used when creating label values.
        */
        get: function () {
            return this.i.ca;
        },
        set: function (v) {
            this.i.ca = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "horizontalLabelFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the HorizontalLabelFormat string.
        */
        get: function () {
            return this.i.ag;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ag = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "verticalLabelFormat", {
        /**
         * Gets or sets the label composite format used when creating label values.
        */
        get: function () {
            return this.i.df;
        },
        set: function (v) {
            this.i.df = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "verticalLabelFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the VerticalLabelFormat string.
        */
        get: function () {
            return this.i.ah;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ah = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "pixelScalingRatio", {
        /**
         * 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: function () {
            return this.i.bl;
        },
        set: function (v) {
            this.i.bl = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "actualPixelScalingRatio", {
        /**
         * Gets the actual scaling value used by the component 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: function () {
            return this.i.a5;
        },
        set: function (v) {
            this.i.a5 = +v;
        },
        enumerable: false,
        configurable: true
    });
    IgxSparklineComponent.prototype.findByName = function (name) {
        if (this.horizontalLabelFormatSpecifiers != null && arrayFindByName(this.horizontalLabelFormatSpecifiers, name)) {
            return arrayFindByName(this.horizontalLabelFormatSpecifiers, name);
        }
        if (this.verticalLabelFormatSpecifiers != null && arrayFindByName(this.verticalLabelFormatSpecifiers, name)) {
            return arrayFindByName(this.verticalLabelFormatSpecifiers, name);
        }
        return null;
    };
    Object.defineProperty(IgxSparklineComponent.prototype, "hasUserValues", {
        get: function () {
            return this._hasUserValues;
        },
        enumerable: false,
        configurable: true
    });
    IgxSparklineComponent.prototype.__m = function (propertyName) {
        if (!this._inStyling) {
            this._hasUserValues.add(propertyName);
        }
    };
    IgxSparklineComponent.prototype._styling = function (container, component, parent) {
        if (this._inStyling) {
            return;
        }
        this._inStyling = true;
        this._stylingContainer = container;
        this._stylingParent = component;
        var genericPrefix = "";
        var typeName = this.i.$type.name;
        if (typeName.indexOf("Xam") === 0) {
            typeName = typeName.substring(3);
        }
        genericPrefix = toSpinal("SparklineComponent");
        var additionalPrefixes = [];
        var prefix = toSpinal(typeName);
        additionalPrefixes.push(prefix + "-");
        var b = this.i.$type.baseType;
        while (b && b.name != "Object" &&
            b.name != "Base" &&
            b.name != "Control" &&
            b.Name != "DependencyObject" &&
            b.Name != "FrameworkElement") {
            typeName = b.name;
            if (typeName.indexOf("Xam") === 0) {
                typeName = typeName.substring(3);
            }
            var basePrefix = toSpinal(typeName);
            additionalPrefixes.push(basePrefix + "-");
            b = b.baseType;
        }
        if (parent) {
            var parentTypeName = parent.i.$type.name;
            if (parentTypeName.indexOf("Xam") === 0) {
                parentTypeName = parentTypeName.substring(3);
            }
            var parentPrefix = toSpinal(parentTypeName);
            additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
            additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
        }
        initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes);
        if (this._otherStyling) {
            this._otherStyling(container, component, parent);
        }
        this._inStyling = false;
    };
    /**
 * Provides a container to the sparkline control.

* @param container  * The container.
*/
    IgxSparklineComponent.prototype.provideContainer = function (container) {
        this.i.provideContainer(container);
    };
    /**
     * Notify that the control has resized.
    
    */
    IgxSparklineComponent.prototype.notifyResized = function () {
        this.i.notifyResized();
    };
    IgxSparklineComponent.prototype.notifySetItem = function (source_, index, oldItem, newItem) {
        this.i.dn(source_, index, oldItem, newItem);
    };
    /**
     * Used to manually notify the IgxSparklineComponent that the data source has reset or cleared its items.  Invoking this method is only necessary if that datasource is not observable.
    
    * @param source_  * The data source which was cleared or reset.
    */
    IgxSparklineComponent.prototype.notifyClearItems = function (source_) {
        this.i.dj(source_);
    };
    IgxSparklineComponent.prototype.notifyInsertItem = function (source_, index, newItem) {
        this.i.dk(source_, index, newItem);
    };
    IgxSparklineComponent.prototype.notifyRemoveItem = function (source_, index, oldItem) {
        this.i.dl(source_, index, oldItem);
    };
    /**
     * Returns the sparkline visuals expressed as a SparklineVisualData object.
    
    */
    IgxSparklineComponent.prototype.exportVisualData = function () {
        var iv = this.i.au();
        return (iv);
    };
    /**
     * Returns visuals as a serialized string.
    
    */
    IgxSparklineComponent.prototype.exportSerializedVisualData = function () {
        var iv = this.i.by();
        return (iv);
    };
    IgxSparklineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxSparklineComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
    IgxSparklineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxSparklineComponent, selector: "igx-sparkline", inputs: { height: "height", width: "width", dataSource: "dataSource", tooltipTemplate: "tooltipTemplate", brush: "brush", negativeBrush: "negativeBrush", markerBrush: "markerBrush", negativeMarkerBrush: "negativeMarkerBrush", firstMarkerBrush: "firstMarkerBrush", lastMarkerBrush: "lastMarkerBrush", highMarkerBrush: "highMarkerBrush", lowMarkerBrush: "lowMarkerBrush", trendLineBrush: "trendLineBrush", horizontalAxisBrush: "horizontalAxisBrush", verticalAxisBrush: "verticalAxisBrush", normalRangeFill: "normalRangeFill", horizontalAxisVisibility: "horizontalAxisVisibility", verticalAxisVisibility: "verticalAxisVisibility", markerVisibility: "markerVisibility", negativeMarkerVisibility: "negativeMarkerVisibility", firstMarkerVisibility: "firstMarkerVisibility", lastMarkerVisibility: "lastMarkerVisibility", lowMarkerVisibility: "lowMarkerVisibility", highMarkerVisibility: "highMarkerVisibility", normalRangeVisibility: "normalRangeVisibility", displayNormalRangeInFront: "displayNormalRangeInFront", markerSize: "markerSize", firstMarkerSize: "firstMarkerSize", lastMarkerSize: "lastMarkerSize", highMarkerSize: "highMarkerSize", lowMarkerSize: "lowMarkerSize", negativeMarkerSize: "negativeMarkerSize", lineThickness: "lineThickness", minimum: "minimum", maximum: "maximum", valueMemberPath: "valueMemberPath", labelMemberPath: "labelMemberPath", trendLineType: "trendLineType", trendLinePeriod: "trendLinePeriod", trendLineThickness: "trendLineThickness", normalRangeMinimum: "normalRangeMinimum", normalRangeMaximum: "normalRangeMaximum", displayType: "displayType", unknownValuePlotting: "unknownValuePlotting", verticalAxisLabel: "verticalAxisLabel", horizontalAxisLabel: "horizontalAxisLabel", formatLabel: "formatLabel", horizontalLabelFormat: "horizontalLabelFormat", horizontalLabelFormatSpecifiers: "horizontalLabelFormatSpecifiers", verticalLabelFormat: "verticalLabelFormat", verticalLabelFormatSpecifiers: "verticalLabelFormatSpecifiers", pixelScalingRatio: "pixelScalingRatio", actualPixelScalingRatio: "actualPixelScalingRatio" }, host: { classAttribute: "ig-sparkline igx-sparkline" }, providers: [], viewQueries: [{ propertyName: "_dynamicContent", first: true, predicate: ["dynamicContent"], descendants: true, read: ViewContainerRef, static: 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 IgxSparklineComponent;
}());
export { IgxSparklineComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxSparklineComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-sparkline',
                    template: "<ng-container #dynamicContent></ng-container>",
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    providers: [],
                    host: { 'class': 'ig-sparkline igx-sparkline' },
                    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.ComponentFactoryResolver }, { type: i0.Injector }]; }, propDecorators: { _dynamicContent: [{
                type: ViewChild,
                args: ["dynamicContent", { read: ViewContainerRef, static: true }]
            }], height: [{
                type: Input
            }], width: [{
                type: Input
            }], dataSource: [{
                type: Input
            }], tooltipTemplate: [{
                type: Input
            }], brush: [{
                type: Input
            }], negativeBrush: [{
                type: Input
            }], markerBrush: [{
                type: Input
            }], negativeMarkerBrush: [{
                type: Input
            }], firstMarkerBrush: [{
                type: Input
            }], lastMarkerBrush: [{
                type: Input
            }], highMarkerBrush: [{
                type: Input
            }], lowMarkerBrush: [{
                type: Input
            }], trendLineBrush: [{
                type: Input
            }], horizontalAxisBrush: [{
                type: Input
            }], verticalAxisBrush: [{
                type: Input
            }], normalRangeFill: [{
                type: Input
            }], horizontalAxisVisibility: [{
                type: Input
            }], verticalAxisVisibility: [{
                type: Input
            }], markerVisibility: [{
                type: Input
            }], negativeMarkerVisibility: [{
                type: Input
            }], firstMarkerVisibility: [{
                type: Input
            }], lastMarkerVisibility: [{
                type: Input
            }], lowMarkerVisibility: [{
                type: Input
            }], highMarkerVisibility: [{
                type: Input
            }], normalRangeVisibility: [{
                type: Input
            }], displayNormalRangeInFront: [{
                type: Input
            }], markerSize: [{
                type: Input
            }], firstMarkerSize: [{
                type: Input
            }], lastMarkerSize: [{
                type: Input
            }], highMarkerSize: [{
                type: Input
            }], lowMarkerSize: [{
                type: Input
            }], negativeMarkerSize: [{
                type: Input
            }], lineThickness: [{
                type: Input
            }], minimum: [{
                type: Input
            }], maximum: [{
                type: Input
            }], valueMemberPath: [{
                type: Input
            }], labelMemberPath: [{
                type: Input
            }], trendLineType: [{
                type: Input
            }], trendLinePeriod: [{
                type: Input
            }], trendLineThickness: [{
                type: Input
            }], normalRangeMinimum: [{
                type: Input
            }], normalRangeMaximum: [{
                type: Input
            }], displayType: [{
                type: Input
            }], unknownValuePlotting: [{
                type: Input
            }], verticalAxisLabel: [{
                type: Input
            }], horizontalAxisLabel: [{
                type: Input
            }], formatLabel: [{
                type: Input
            }], horizontalLabelFormat: [{
                type: Input
            }], horizontalLabelFormatSpecifiers: [{
                type: Input
            }], verticalLabelFormat: [{
                type: Input
            }], verticalLabelFormatSpecifiers: [{
                type: Input
            }], pixelScalingRatio: [{
                type: Input
            }], actualPixelScalingRatio: [{
                type: Input
            }] } });
