/*
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 * as tslib_1 from "tslib";
import { TemplateRef, Injector, ComponentFactoryResolver, Component, Renderer2, ViewChild, Input, NgZone, ChangeDetectionStrategy, ViewContainerRef } from '@angular/core';
import { AngularRenderer, AngularWrapper } from "igniteui-angular-core";
import { Visibility, Visibility_$type } from "igniteui-angular-core";
import { TypeRegistrar } from "igniteui-angular-core";
import { XamSparkline } from './XamSparkline';
import { brushToString, stringToBrush, ensureBool, ensureEnum, toSpinal, initializePropertiesFromCss, NamePatcher } from "igniteui-angular-core";
import { IgxDataContext } from "igniteui-angular-core";
import { SparklineStylingDefaults } from './SparklineStylingDefaults';
import { TrendLineType, TrendLineType_$type } from "igniteui-angular-core";
import { SparklineDisplayType, SparklineDisplayType_$type } from './SparklineDisplayType';
import { UnknownValuePlotting, UnknownValuePlotting_$type } from "igniteui-angular-core";
export var IgxSparklineComponent_PROVIDERS = [];
/**
 * Represents a sparkline chart.
*/
var IgxSparklineComponent = /** @class */ (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: true,
        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: true,
        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: true,
        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: true,
        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: true,
        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.eu);
        },
        set: function (v) {
            this.i.eu = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeBrush", {
        /**
         * Gets or sets the negative brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.e1);
        },
        set: function (v) {
            this.i.e1 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "markerBrush", {
        /**
         * Gets or sets the marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.e0);
        },
        set: function (v) {
            this.i.e0 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeMarkerBrush", {
        /**
         * Gets or sets the negative marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.e2);
        },
        set: function (v) {
            this.i.e2 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "firstMarkerBrush", {
        /**
         * Gets or sets the first marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.ev);
        },
        set: function (v) {
            this.i.ev = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lastMarkerBrush", {
        /**
         * Gets or sets the last marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.ey);
        },
        set: function (v) {
            this.i.ey = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "highMarkerBrush", {
        /**
         * Gets or sets the high marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.ew);
        },
        set: function (v) {
            this.i.ew = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lowMarkerBrush", {
        /**
         * Gets or sets the low marker brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.ez);
        },
        set: function (v) {
            this.i.ez = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLineBrush", {
        /**
         * Gets or sets the trendline brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.e4);
        },
        set: function (v) {
            this.i.e4 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "horizontalAxisBrush", {
        /**
         * Gets or sets the horizontal axis line brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.ex);
        },
        set: function (v) {
            this.i.ex = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "verticalAxisBrush", {
        /**
         * Gets or sets the vertical axis line brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.e5);
        },
        set: function (v) {
            this.i.e5 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeFill", {
        /**
         * Gets or sets the normal range brush of the sparkline.
        */
        get: function () {
            return brushToString(this.i.e3);
        },
        set: function (v) {
            this.i.e3 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "horizontalAxisVisibility", {
        /**
         * Gets or sets the display state of the horizontal axis.
        */
        get: function () {
            return this.i.e8;
        },
        set: function (v) {
            this.i.e8 = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "verticalAxisVisibility", {
        /**
         * Gets or sets the display state of the vertical axis.
        */
        get: function () {
            return this.i.ff;
        },
        set: function (v) {
            this.i.ff = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "markerVisibility", {
        /**
         * Gets or sets the marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fb;
        },
        set: function (v) {
            this.i.fb = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeMarkerVisibility", {
        /**
         * Gets or sets the negative marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fc;
        },
        set: function (v) {
            this.i.fc = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "firstMarkerVisibility", {
        /**
         * Gets or sets the first marker visibility of the sparkline.
        */
        get: function () {
            return this.i.e6;
        },
        set: function (v) {
            this.i.e6 = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lastMarkerVisibility", {
        /**
         * Gets or sets the last marker visibility of the sparkline.
        */
        get: function () {
            return this.i.e9;
        },
        set: function (v) {
            this.i.e9 = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lowMarkerVisibility", {
        /**
         * Gets or sets the low marker visibility of the sparkline.
        */
        get: function () {
            return this.i.fa;
        },
        set: function (v) {
            this.i.fa = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "highMarkerVisibility", {
        /**
         * Gets or sets the high marker visibility of the sparkline.
        */
        get: function () {
            return this.i.e7;
        },
        set: function (v) {
            this.i.e7 = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeVisibility", {
        /**
         * Gets or sets the normal range visibility of the sparkline.
        */
        get: function () {
            return this.i.fd;
        },
        set: function (v) {
            this.i.fd = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "displayNormalRangeInFront", {
        /**
         * Gets or sets the position of the normal range on the sparkline.
        */
        get: function () {
            return this.i.as;
        },
        set: function (v) {
            this.i.as = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "markerSize", {
        /**
         * Gets or sets the marker size of the sparkline.
        */
        get: function () {
            return this.i.a9;
        },
        set: function (v) {
            this.i.a9 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "firstMarkerSize", {
        /**
         * Gets or sets the first marker size of the sparkline.
        */
        get: function () {
            return this.i.a2;
        },
        set: function (v) {
            this.i.a2 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lastMarkerSize", {
        /**
         * Gets or sets the last marker size of the sparkline.
        */
        get: function () {
            return this.i.a4;
        },
        set: function (v) {
            this.i.a4 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "highMarkerSize", {
        /**
         * Gets or sets the high marker size of the sparkline.
        */
        get: function () {
            return this.i.a3;
        },
        set: function (v) {
            this.i.a3 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lowMarkerSize", {
        /**
         * Gets or sets the low marker size of the sparkline.
        */
        get: function () {
            return this.i.a8;
        },
        set: function (v) {
            this.i.a8 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "negativeMarkerSize", {
        /**
         * Gets or sets the negative marker size of the sparkline.
        */
        get: function () {
            return this.i.be;
        },
        set: function (v) {
            this.i.be = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "lineThickness", {
        /**
         * Gets or sets the line thickness of the sparkline.
        */
        get: function () {
            return this.i.a5;
        },
        set: function (v) {
            this.i.a5 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "minimum", {
        /**
         * Gets or sets the minimum value of the y axis.
        */
        get: function () {
            return this.i.bd;
        },
        set: function (v) {
            this.i.bd = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "maximum", {
        /**
         * Gets or sets the maximum value of the y axis.
        */
        get: function () {
            return this.i.bc;
        },
        set: function (v) {
            this.i.bc = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "valueMemberPath", {
        /**
         * Gets or sets the string path to the value column.
        */
        get: function () {
            return this.i.c2;
        },
        set: function (v) {
            this.i.c2 = v;
        },
        enumerable: true,
        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.b7;
        },
        set: function (v) {
            this.i.b7 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLineType", {
        /**
         * Gets or sets the type of trendline used by the sparkline.
        */
        get: function () {
            return this.i.an;
        },
        set: function (v) {
            this.i.an = ensureEnum(TrendLineType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLinePeriod", {
        /**
         * Gets or sets the trendline period used by the sparkline.
        */
        get: function () {
            return this.i.bm;
        },
        set: function (v) {
            this.i.bm = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "trendLineThickness", {
        /**
         * Gets or sets the thickness of the sparkline's trendline.
        */
        get: function () {
            return this.i.bi;
        },
        set: function (v) {
            this.i.bi = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeMinimum", {
        /**
         * Gets or sets the minimum value of the normal range.
        */
        get: function () {
            return this.i.bg;
        },
        set: function (v) {
            this.i.bg = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "normalRangeMaximum", {
        /**
         * Gets or sets the maximum value of the normal range.
        */
        get: function () {
            return this.i.bf;
        },
        set: function (v) {
            this.i.bf = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "displayType", {
        /**
         * Gets or sets the display type of the sparkline.
        */
        get: function () {
            return this.i.am;
        },
        set: function (v) {
            this.i.am = ensureEnum(SparklineDisplayType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "unknownValuePlotting", {
        /**
         * Gets or sets the way null values are interpreted.
        */
        get: function () {
            return this.i.ao;
        },
        set: function (v) {
            this.i.ao = ensureEnum(UnknownValuePlotting_$type, v);
        },
        enumerable: true,
        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.bp;
        },
        set: function (v) {
            this.i.bp = v;
        },
        enumerable: true,
        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.bn;
        },
        set: function (v) {
            this.i.bn = v;
        },
        enumerable: true,
        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.bl;
        },
        set: function (v) {
            this.i.bl = v;
        },
        enumerable: true,
        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.bh;
        },
        set: function (v) {
            this.i.bh = +v;
        },
        enumerable: true,
        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.a1;
        },
        set: function (v) {
            this.i.a1 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxSparklineComponent.prototype, "hasUserValues", {
        get: function () {
            return this._hasUserValues;
        },
        enumerable: true,
        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.dd(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.c9(source_);
    };
    IgxSparklineComponent.prototype.notifyInsertItem = function (source_, index, newItem) {
        this.i.da(source_, index, newItem);
    };
    IgxSparklineComponent.prototype.notifyRemoveItem = function (source_, index, oldItem) {
        this.i.db(source_, index, oldItem);
    };
    /**
     * Returns the sparkline visuals expressed as a SparklineVisualData object.
    
    */
    IgxSparklineComponent.prototype.exportVisualData = function () {
        var iv = this.i.aq();
        return (iv);
    };
    /**
     * Returns visuals as a serialized string.
    
    */
    IgxSparklineComponent.prototype.exportSerializedVisualData = function () {
        var iv = this.i.bu();
        return (iv);
    };
    tslib_1.__decorate([
        ViewChild("dynamicContent", { read: ViewContainerRef, static: true }),
        tslib_1.__metadata("design:type", ViewContainerRef)
    ], IgxSparklineComponent.prototype, "_dynamicContent", void 0);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "height", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "width", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxSparklineComponent.prototype, "dataSource", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", TemplateRef),
        tslib_1.__metadata("design:paramtypes", [TemplateRef])
    ], IgxSparklineComponent.prototype, "tooltipTemplate", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "brush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "negativeBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "markerBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "negativeMarkerBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "firstMarkerBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "lastMarkerBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "highMarkerBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "lowMarkerBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "trendLineBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "horizontalAxisBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "verticalAxisBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "normalRangeFill", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "horizontalAxisVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "verticalAxisVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "markerVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "negativeMarkerVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "firstMarkerVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "lastMarkerVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "lowMarkerVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "highMarkerVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "normalRangeVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxSparklineComponent.prototype, "displayNormalRangeInFront", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "markerSize", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "firstMarkerSize", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "lastMarkerSize", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "highMarkerSize", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "lowMarkerSize", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "negativeMarkerSize", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "lineThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "minimum", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "maximum", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "valueMemberPath", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxSparklineComponent.prototype, "labelMemberPath", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "trendLineType", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "trendLinePeriod", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "trendLineThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "normalRangeMinimum", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "normalRangeMaximum", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "displayType", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "unknownValuePlotting", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxSparklineComponent.prototype, "verticalAxisLabel", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxSparklineComponent.prototype, "horizontalAxisLabel", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", [Function])
    ], IgxSparklineComponent.prototype, "formatLabel", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "pixelScalingRatio", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxSparklineComponent.prototype, "actualPixelScalingRatio", null);
    IgxSparklineComponent = tslib_1.__decorate([
        Component({
            selector: 'igx-sparkline',
            template: "<ng-container #dynamicContent></ng-container>",
            changeDetection: ChangeDetectionStrategy.OnPush,
            providers: IgxSparklineComponent_PROVIDERS,
            host: { 'class': 'ig-sparkline igx-sparkline' },
            styles: ["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]
        }),
        tslib_1.__metadata("design:paramtypes", [Renderer2,
            ViewContainerRef,
            NgZone,
            ComponentFactoryResolver,
            Injector])
    ], IgxSparklineComponent);
    return IgxSparklineComponent;
}());
export { IgxSparklineComponent };
//# sourceMappingURL=igx-sparkline-component.js.map