/*
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 { Injector, ComponentFactoryResolver, Component, Renderer2, ViewChild, ContentChildren, QueryList, Input, forwardRef, NgZone, ChangeDetectionStrategy, ViewContainerRef } from '@angular/core';
import { IgxAxisComponent } from './igx-axis-component';
import { IgxSeriesComponent } from './igx-series-component';
import { GridMode, GridMode_$type } from './GridMode';
import { IgxSeriesViewerComponent } from './igx-series-viewer-component';
import { AngularRenderer, AngularWrapper } from "igniteui-angular-core/ES5/angular-renderer";
import { TypeRegistrar } from "igniteui-angular-core/ES5/type";
import { XamDataChart } from './XamDataChart';
import { CollectionAdapter, brushToString, stringToBrush, fromBrushCollection, toBrushCollection, ensureBool, ensureEnum } from "igniteui-angular-core/ES5/componentUtil";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import { DataContext } from "igniteui-angular-core/ES5/igx-data-context";
import { SeriesCollection } from './igx-series-collection';
import { NotifyCollectionChangedAction } from "igniteui-angular-core/ES5/NotifyCollectionChangedAction";
import { AxisCollection } from './igx-axis-collection';
import { SyncLinkManager } from './SyncLinkManager';
import { SyncLink } from './SyncLink';
export var IgxDataChartComponent_PROVIDERS = [{ provide: IgxSeriesViewerComponent, useExisting: forwardRef(function () { return IgxDataChartComponent; }) }];
/**
 * Represents a chart area containing axes, series, an optional legend and other hosted content.
*/
var IgxDataChartComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxDataChartComponent, _super);
    function IgxDataChartComponent(_renderer, _elRef, _ngZone, _componentFactoryResolver, _injector) {
        var _this = _super.call(this) || this;
        _this._renderer = _renderer;
        _this._elRef = _elRef;
        _this._ngZone = _ngZone;
        _this._componentFactoryResolver = _componentFactoryResolver;
        _this._injector = _injector;
        /**
         * The series actually present in the chart. Do not directly modify this array.
         * This array's contents can be modified by causing Angular to reproject the child content.
         * Or adding and removing series from the manual series collection on the series property.
         */
        _this.actualSeries = [];
        /**
         * The axes actually present in the chart. Do not directly modify this array.
         * This array's contents can be modified by causing Angular to reproject the child content.
         * Or adding and removing axes from the manual axes collection on the axes property.
         */
        _this.actualAxes = [];
        _this._series = null;
        _this._axes = null;
        _this._root = null;
        _this._dataSource = null;
        _this._axesAdapter = null;
        _this._seriesAdapter = null;
        _this._defaultTooltips = null;
        _this._zoneRunner = function (act) { return _this._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.nativeElement != null) {
            root = _this._container.nativeElement;
        }
        _this._root = root;
        var ren = new AngularRenderer(root, _this._renderer, window.document, _this._ngZone, true, DataChartStylingDefaults);
        _this._wrapper = ren;
        var chart = _this.i;
        _this._chart = chart;
        _this._axesAdapter = new CollectionAdapter([], _this.i.axes, _this.actualAxes, function (c) { return c.i; }, function (i) {
            i._provideRenderer(_this._wrapper);
            i.provideData(_this._dataSource);
            if (_this._container && _this._container.parentElement) {
                i._styling(_this._root, _this, _this);
            }
        }, function (i) { i._provideRenderer(null); i.provideData(null); });
        _this._seriesAdapter = new CollectionAdapter([], _this.i.series, _this.actualSeries, function (c) { return c.i; }, function (i) {
            i.owner = _this;
            i._provideRenderer(_this._dataSource);
            i.provideData(_this._dataSource);
            if (_this._container && _this._container.parentElement) {
                i._styling(_this._root, _this, _this);
            }
            i.bindAxes(_this.actualAxes);
            _this._ensureDefaultTooltip(i);
            _this._ensureTooltipCreated(i);
        }, function (i) { i._provideRenderer(null); i.provideData(null); });
        chart.provideContainer(ren);
        ren.addSizeWatcher(function () {
            _this._chart.notifyContainerResized();
        });
        return _this;
    }
    IgxDataChartComponent_1 = IgxDataChartComponent;
    Object.defineProperty(IgxDataChartComponent.prototype, "height", {
        get: function () {
            return this._height;
        },
        set: function (value) {
            this._height = value;
            this._renderer.setStyle(this._elRef.element.nativeElement, "height", value);
            this._chart.notifyContainerResized();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "width", {
        get: function () {
            return this._width;
        },
        set: function (value) {
            this._width = value;
            this._renderer.setStyle(this._elRef.element.nativeElement, "width", value);
            this._chart.notifyContainerResized();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "legend", {
        /**
         * Gets or sets the legend used for the current chart.
        */
        get: function () {
            if (this.i.legend != null)
                return this.i.legend.externalObject;
        },
        set: function (v) {
            if (v != undefined && v != null)
                this.i.legend = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "series", {
        /**
         * A collection or manually added series for the chart.
        */
        get: function () {
            var _this = this;
            if (this._series === null) {
                var coll = new SeriesCollection();
                var inner = coll._innerColl;
                inner.addListener(function (sender, e) {
                    switch (e.action) {
                        case NotifyCollectionChangedAction.Add:
                            _this._seriesAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
                            break;
                        case NotifyCollectionChangedAction.Remove:
                            _this._seriesAdapter.removeManualItemAt(e.oldStartingIndex);
                            break;
                        case NotifyCollectionChangedAction.Replace:
                            _this._seriesAdapter.removeManualItemAt(e.oldStartingIndex);
                            _this._seriesAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
                            break;
                        case NotifyCollectionChangedAction.Reset:
                            _this._seriesAdapter.clearManualItems();
                            break;
                    }
                });
                this._series = coll;
            }
            return this._series;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "axes", {
        /**
         * A collection or manually added axes for the chart.
        */
        get: function () {
            var _this = this;
            if (this._axes === null) {
                var coll = new AxisCollection();
                var inner = coll._innerColl;
                inner.addListener(function (sender, e) {
                    switch (e.action) {
                        case NotifyCollectionChangedAction.Add:
                            _this._axesAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
                            break;
                        case NotifyCollectionChangedAction.Remove:
                            _this._axesAdapter.removeManualItemAt(e.oldStartingIndex);
                            break;
                        case NotifyCollectionChangedAction.Replace:
                            _this._axesAdapter.removeManualItemAt(e.oldStartingIndex);
                            _this._axesAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
                            break;
                        case NotifyCollectionChangedAction.Reset:
                            _this._axesAdapter.clearManualItems();
                            break;
                    }
                });
                this._axes = coll;
            }
            return this._axes;
        },
        enumerable: true,
        configurable: true
    });
    IgxDataChartComponent.prototype.ngOnDestroy = function () {
        this._chart.destroy();
        this._wrapper.destroy();
    };
    IgxDataChartComponent.prototype.createImplementation = function () {
        return new XamDataChart();
    };
    Object.defineProperty(IgxDataChartComponent.prototype, "dataSource", {
        get: function () {
            return this._dataSource;
        },
        set: function (value) {
            this._dataSource = value;
            this.bindData();
        },
        enumerable: true,
        configurable: true
    });
    IgxDataChartComponent.prototype.bindData = function () {
        //console.log("binding data: " + this._dataSource);
        if (this.actualAxes && this.actualAxes.length > 0) {
            var currAxes = this.actualAxes;
            for (var i = 0; i < currAxes.length; i++) {
                currAxes[i].provideData(this._dataSource);
            }
        }
        if (this.actualSeries && this.actualSeries.length > 0) {
            var currSeries = this.actualSeries;
            for (var i = 0; i < currSeries.length; i++) {
                currSeries[i].provideData(this._dataSource);
            }
        }
    };
    IgxDataChartComponent.prototype.ngAfterContentInit = function () {
        var _this = this;
        if (TypeRegistrar.isRegistered("IgxDataChartDefaultTooltipsComponent")) {
            var c = TypeRegistrar.get("IgxDataChartDefaultTooltipsComponent");
            var cf = this._componentFactoryResolver.resolveComponentFactory(c);
            var cr_1 = this._dynamicContent.createComponent(cf);
            //let cr = cf.create(this._injector);
            this._defaultTooltips = cr_1;
            cr_1.instance.onContentReady.subscribe(function () {
                _this._onDefaultTooltipsReady(cr_1);
            });
            //this._container.appendChild(cr.location.nativeElement);
        }
        this._axesAdapter.updateQuery(this.contentAxes);
        this._seriesAdapter.updateQuery(this.contentSeries);
        if (this.actualAxes && this.actualAxes.length > 0) {
            var currAxes = this.actualAxes;
            for (var i = 0; i < currAxes.length; i++) {
                currAxes[i].provideData(this._dataSource);
            }
        }
        if (this.actualSeries && this.actualSeries.length > 0) {
            var currSeries = this.actualSeries;
            for (var i = 0; i < currSeries.length; i++) {
                currSeries[i].provideData(this._dataSource);
            }
        }
        this._styling(this._root, this);
        this.i.notifyContainerResized();
    };
    IgxDataChartComponent.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;
        });
    };
    IgxDataChartComponent.prototype._ensureDefaultTooltip = function (series) {
        if (this._defaultTooltips == null) {
            return;
        }
        this._defaultTooltips.instance["ensureDefaultTooltip"](series);
    };
    IgxDataChartComponent.prototype._onDefaultTooltipsReady = function (cr) {
        if (this.actualSeries && this.actualSeries.length > 0) {
            var currSeries = this.actualSeries;
            for (var i = 0; i < currSeries.length; i++) {
                if (currSeries[i].showDefaultTooltip) {
                    this._ensureDefaultTooltip(currSeries[i]);
                }
            }
        }
    };
    IgxDataChartComponent.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 DataContext();
                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;
    };
    Object.defineProperty(IgxDataChartComponent.prototype, "syncChannel", {
        /**
         * Gets or sets the channel with which to synchronize.
        *
        * Synchronization is the coordination of zooming, panning and crosshairs events between multiple charts. Multiple chart controls can be synchronized horizontally (along X-Axis), vertically (along Y-Axis), or both. If you want to synchronize a set of charts, assign them the same name to the `syncChannel` and then specify whether or not synchronize chart horizontally and/or vertically.
        */
        get: function () {
            return this.i.syncChannel;
        },
        set: function (v) {
            var newLink = null;
            if (v && v.length > 0) {
                newLink = SyncLinkManager.instance().getLink(v);
            }
            var oldLink = this.i.actualSyncLink;
            if (oldLink) {
                SyncLinkManager.instance().releaseLink(oldLink);
            }
            if (newLink) {
                this.i.actualSyncLink = newLink;
            }
            else {
                this.i.actualSyncLink = new SyncLink();
            }
            this.i.syncChannel = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "synchronizeVertically", {
        /**
         * Gets or sets the bool used to display the window preview shadow.
        *
        * Synchronization is the coordination of zooming, panning and crosshairs events between multiple charts. Multiple chart controls can be synchronized horizontally (along X-Axis), vertically (along Y-Axis), or both. If you want to synchronize a set of charts, assign them the same name to the `syncChannel` and then specify whether or not synchronize chart horizontally and/or vertically.
        */
        get: function () {
            return this.i.syncSettings ? this.i.syncSettings.synchronizeVertically : false;
        },
        set: function (v) {
            this.i.syncSettings.synchronizeVertically = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "synchronizeHorizontally", {
        /**
         * Gets or sets the bool used to display the window preview shadow.
        *
        * Synchronization is the coordination of zooming, panning and crosshairs events between multiple charts. Multiple chart controls can be synchronized horizontally (along X-Axis), vertically (along Y-Axis), or both. If you want to synchronize a set of charts, assign them the same name to the `syncChannel` and then specify whether or not synchronize chart horizontally and/or vertically.
        */
        get: function () {
            return this.i.syncSettings ? this.i.syncSettings.synchronizeHorizontally : false;
        },
        set: function (v) {
            this.i.syncSettings.synchronizeHorizontally = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "i", {
        /**
                                 * @hidden
                                 */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "isSquare", {
        /**
     * Gets or sets whether to use a square aspect ratio for the chart. This is locked to true for polar and radial charts.
    *
    * Set `isSquare` to true to constrain the chart to a square, using the minimum of its height and width.
    *
    * ```html
    * <igx-data-chart [dataSource]="data"
    *     isSquare="true"
    *     width="800px"
    *     height="400px">
    *   <igx-category-x-axis #xAxis
    *     label="label">
    *   </igx-category-x-axis>
    *   <igx-numeric-y-axis #yAxis
    *     majorStroke="green">
    *   </igx-numeric-y-axis>
    *
    *   <igx-column-series
    *     [xAxis]="xAxis"
    *     [yAxis]="yAxis"
    *     valueMemberPath="value">
    *   </igx-column-series>
    * </igx-data-chart>
    * ```
    *
    * ```ts
    *  this.chart.isSquare="True";
    * ```
    */
        get: function () {
            return this.i.ns;
        },
        set: function (v) {
            this.i.ns = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "windowScaleHorizontal", {
        /**
         * A number between 0 and 1 determining the scale of the horizontal zoom.
         * This property is effectively a shortcut to the Width of the WindowRect property.
        *
        * To programmatically change the horizontal zoom level, set `windowScaleHorizontal` to a value between 0 and 1.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     windowScaleHorizontal="0.75">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.windowScaleHorizontal="0.75";
        * ```
        */
        get: function () {
            return this.i.ob;
        },
        set: function (v) {
            this.i.ob = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "windowScaleVertical", {
        /**
         * A number between 0 and 1 determining the scale of the vertical zoom.
         * This property is effectively a shortcut to the Height of the WindowRect property.
        *
        * To programmatically change the vertical zoom level, set `windowScaleVertical` to a value between 0 and 1.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     windowScaleVertical="0.75">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.windowScaleVertical="0.75";
        * ```
        */
        get: function () {
            return this.i.oc;
        },
        set: function (v) {
            this.i.oc = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "actualWindowScaleHorizontal", {
        /**
         * A number between 0 and 1 determining the scale of the horizontal zoom.
         * This property is effectively a shortcut to the Width of the ActualWindowRect property.
        */
        get: function () {
            return this.i.n3;
        },
        set: function (v) {
            this.i.n3 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "actualWindowScaleVertical", {
        /**
         * A number between 0 and 1 determining the scale of the vertical zoom.
         * This property is effectively a shortcut to the Height of the ActualWindowRect property.
        */
        get: function () {
            return this.i.n4;
        },
        set: function (v) {
            this.i.n4 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "isHorizontalZoomEnabled", {
        /**
         * Gets or sets horizontal zoomability of the current control
        *
        * Set `isHorizontalZoomEnabled` to enable or disable horizontal zooming.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     isHorizontalZoomEnabled="true">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.IsHorizontalZoomEnabled= true;
        * ```
        */
        get: function () {
            return this.i.nr;
        },
        set: function (v) {
            this.i.nr = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "isVerticalZoomEnabled", {
        /**
         * Gets or sets vertical zoomability of the current control
        *
        * Set `isVerticalZoomEnabled` to enable or disable vertical zooming.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     isVerticalZoomEnabled="true">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.isVerticalZoomEnabled="True";
        * ```
        */
        get: function () {
            return this.i.nt;
        },
        set: function (v) {
            this.i.nt = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "gridMode", {
        /**
         * Gets or sets how grid lines are rendered in relation to series.
        *
        *  Try setting the `gridMode` property to bring your grid lines in front of the data series.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     gridMode="beforeSeries">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis
        *     majorStroke="green">
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        */
        get: function () {
            return this.i.ng;
        },
        set: function (v) {
            this.i.ng = ensureEnum(GridMode_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "alignsGridLinesToPixels", {
        /**
         * Gets or sets a value indicating whether grid and tick lines are aligned to device pixels.
        */
        get: function () {
            return this.i.nn;
        },
        set: function (v) {
            this.i.nn = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "brushes", {
        /**
         * Gets or sets the palette of brushes to use for coloring the chart series.
        *
        * `brushes` can be set declaratively to a list of color strings.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     brushes="red,green,blue">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.brushes="red" ;
        * ```
        */
        get: function () {
            return fromBrushCollection(this.i.m9);
        },
        set: function (v) {
            this.i.m9 = toBrushCollection(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "markerBrushes", {
        /**
         * Gets or sets the MarkerBrushes property.
         * The brushes property defines the palette from which automatically assigned series brushes are selected.
        *
        * `markerBrushes` can be set declaratively to a list of color strings.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     markerBrushes="red,green,blue">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value"
        *     markerType="circle">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value"
        *     markerType="circle">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value"
        *     markerType="circle">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.markerBrushes="red,green,blue";
        * ```
        */
        get: function () {
            return fromBrushCollection(this.i.na);
        },
        set: function (v) {
            this.i.na = toBrushCollection(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "outlines", {
        /**
         * Gets or sets the palette of brushes to use for outlines on the chart series.
        *
        * `outlines` can be set declaratively to a list of color strings.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     outlines="red,green,blue">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.outlines="red,green,blue";
        * ```
        */
        get: function () {
            return fromBrushCollection(this.i.nc);
        },
        set: function (v) {
            this.i.nc = toBrushCollection(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "markerOutlines", {
        /**
         * Gets or sets the MarkerOutlines property.
         * The brushes property defines the palette from which automatically assigned series brushes are selected.
        *
        * `markerOutlines` can be set declaratively to a list of color strings.
        *
        * ```html
        * <igx-data-chart [dataSource]="data"
        *     markerOutlines="red,green,blue">
        *   <igx-category-x-axis #xAxis
        *     label="label">
        *   </igx-category-x-axis>
        *   <igx-numeric-y-axis #yAxis>
        *   </igx-numeric-y-axis>
        *
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value"
        *     markerType="circle">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value"
        *     markerType="circle">
        *   </igx-column-series>
        *   <igx-column-series
        *     [xAxis]="xAxis"
        *     [yAxis]="yAxis"
        *     valueMemberPath="value"
        *     markerType="circle">
        *   </igx-column-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * this.chart.markerOutlines="red,green,blue";
        * ```
        */
        get: function () {
            return fromBrushCollection(this.i.nb);
        },
        set: function (v) {
            this.i.nb = toBrushCollection(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "defaultAxisStroke", {
        /**
         * Gets or sets the DefaultAxisStroke property.
         * The DefaultAxisStroke property defines the brush which is used by the axes when no Axis.Stroke is set.
        */
        get: function () {
            return brushToString(this.i.po);
        },
        set: function (v) {
            this.i.po = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "defaultAxisMajorStroke", {
        /**
         * Gets or sets the DefaultAxisMajorStroke property.
         * The DefaultAxisMajorStroke property defines the brush which is used by the axes when no Axis.MajorStroke is set.
        */
        get: function () {
            return brushToString(this.i.pm);
        },
        set: function (v) {
            this.i.pm = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "defaultAxisMinorStroke", {
        /**
         * Gets or sets the DefaultAxisMinorStroke property.
         * The DefaultAxisMinorStroke property defines the brush which is used by the axes when no Axis.MinorStroke is set.
        */
        get: function () {
            return brushToString(this.i.pn);
        },
        set: function (v) {
            this.i.pn = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "plotAreaMarginLeft", {
        /**
         * Margin applied to the left of the plot area.
        */
        get: function () {
            return this.i.n8;
        },
        set: function (v) {
            this.i.n8 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "plotAreaMarginTop", {
        /**
         * Margin applied above the plot area.
        */
        get: function () {
            return this.i.oa;
        },
        set: function (v) {
            this.i.oa = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "plotAreaMarginRight", {
        /**
         * Margin applied to the right of the plot area.
        */
        get: function () {
            return this.i.n9;
        },
        set: function (v) {
            this.i.n9 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxDataChartComponent.prototype, "plotAreaMarginBottom", {
        /**
         * Margin applied below the plot area.
        */
        get: function () {
            return this.i.n7;
        },
        set: function (v) {
            this.i.n7 = +v;
        },
        enumerable: true,
        configurable: true
    });
    /**
 * Notifies the chart that the CSS styles in effect have been updated.

*/
    IgxDataChartComponent.prototype.styleUpdated = function () {
        this.i.o4();
    };
    /**
     * Export serialized visual data.
    
    */
    IgxDataChartComponent.prototype.exportSerializedVisualData = function () {
        var iv = this.i.om();
        return (iv);
    };
    var IgxDataChartComponent_1;
    tslib_1.__decorate([
        ContentChildren(IgxAxisComponent),
        tslib_1.__metadata("design:type", QueryList)
    ], IgxDataChartComponent.prototype, "contentAxes", void 0);
    tslib_1.__decorate([
        ContentChildren(IgxSeriesComponent),
        tslib_1.__metadata("design:type", QueryList)
    ], IgxDataChartComponent.prototype, "contentSeries", void 0);
    tslib_1.__decorate([
        ViewChild("dynamicContent", { read: ViewContainerRef, static: true }),
        tslib_1.__metadata("design:type", ViewContainerRef)
    ], IgxDataChartComponent.prototype, "_dynamicContent", void 0);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxDataChartComponent.prototype, "height", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxDataChartComponent.prototype, "width", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxDataChartComponent.prototype, "legend", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxDataChartComponent.prototype, "dataSource", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxDataChartComponent.prototype, "syncChannel", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxDataChartComponent.prototype, "synchronizeVertically", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxDataChartComponent.prototype, "synchronizeHorizontally", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxDataChartComponent.prototype, "isSquare", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "windowScaleHorizontal", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "windowScaleVertical", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "actualWindowScaleHorizontal", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "actualWindowScaleVertical", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxDataChartComponent.prototype, "isHorizontalZoomEnabled", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxDataChartComponent.prototype, "isVerticalZoomEnabled", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "gridMode", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxDataChartComponent.prototype, "alignsGridLinesToPixels", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], IgxDataChartComponent.prototype, "brushes", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], IgxDataChartComponent.prototype, "markerBrushes", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], IgxDataChartComponent.prototype, "outlines", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], IgxDataChartComponent.prototype, "markerOutlines", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxDataChartComponent.prototype, "defaultAxisStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxDataChartComponent.prototype, "defaultAxisMajorStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxDataChartComponent.prototype, "defaultAxisMinorStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "plotAreaMarginLeft", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "plotAreaMarginTop", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "plotAreaMarginRight", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxDataChartComponent.prototype, "plotAreaMarginBottom", null);
    IgxDataChartComponent = IgxDataChartComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-data-chart',
            template: "<ng-container #dynamicContent></ng-container>",
            changeDetection: ChangeDetectionStrategy.OnPush,
            providers: [{ provide: IgxSeriesViewerComponent, useExisting: forwardRef(function () { return IgxDataChartComponent_1; }) }],
            host: { 'class': 'igx-data-chart ig-data-chart' },
            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])
    ], IgxDataChartComponent);
    return IgxDataChartComponent;
}(IgxSeriesViewerComponent));
export { IgxDataChartComponent };
//# sourceMappingURL=igx-data-chart-component.js.map