/*
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 React from 'react';
import { Visibility_$type } from "igniteui-react-core/ES2015/Visibility";
import { TransitionInSpeedType_$type } from './TransitionInSpeedType';
import { SeriesHitTestMode_$type } from './SeriesHitTestMode';
import { brushToString, stringToBrush, toPoint, fromPoint, fromRect, stringToColor, colorToString, ensureEnum, ensureBool, isValidProp, getModifiedProps } from "igniteui-react-core/ES2015/componentUtil";
import { RenderRequestedEventArgs } from './RenderRequestedEventArgs';
import { delegateCombine, delegateRemove, TypeRegistrar } from "igniteui-react-core/ES2015/type";
/**
 * Represents the base class for all IgxDataChartComponent series.
*/
export class IgrSeries extends React.Component {
    constructor(props) {
        super(props);
        this._chartLevelData = null;
        this._dataSource = null;
        this._tooltipTemplate = null;
        this._tooltipContent = null;
        this._tooltipContainerTemplate = null;
        this._renderer = null;
        this._renderRequested = null;
        this._renderRequested_wrapped = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    createImplementation() {
        return null;
    }
    initializeProperties() {
        for (const p of Object.keys(this.props)) {
            if (isValidProp(this, p)) {
                this[p] = this.props[p];
            }
        }
    }
    componentDidMount() {
        this.initializeProperties();
    }
    get seriesInternal() {
        return this.i;
    }
    shouldComponentUpdate(nextProps, nextState) {
        const mod = getModifiedProps(this.props, nextProps);
        for (const p of Object.keys(mod)) {
            if (isValidProp(this, p)) {
                this[p] = mod[p];
            }
        }
        return true;
    }
    render() {
        return null;
    }
    set name(value) {
        this.i.name = value;
    }
    get name() {
        return this.i.name;
    }
    provideData(data) {
        this._chartLevelData = data;
        this.updateDataSource();
    }
    updateDataSource() {
        if (this._dataSource == null) {
            this.i.itemsSource = this._chartLevelData;
        }
        else {
            this.i.itemsSource = this._dataSource;
        }
    }
    set dataSource(value) {
        this._dataSource = value;
        this.updateDataSource();
        //console.log("setting axis data source: " + value)
    }
    get dataSource() {
        if (this._dataSource != null) {
            return this._dataSource;
        }
        return this.i.itemsSource;
    }
    bindAxes(axes) {
    }
    set tooltipTemplate(value) {
        this._tooltipTemplate = value;
        if (value == null) {
            if (this._tooltipContent !== null) {
                //this._tooltipContent.destroy();
                this._tooltipContent = null;
            }
        }
        if (this._tooltipContent != null) {
            this._tooltipContent.template = this._tooltipTemplate;
        }
        else {
            if (this.owner != null) {
                this.owner._ensureTooltipCreated(this);
            }
        }
    }
    get tooltipTemplate() {
        return this._tooltipTemplate;
    }
    set tooltipContainerTemplate(value) {
        this._tooltipContainerTemplate = value;
        if (this._tooltipContent != null) {
            this._tooltipContent.instance.containerTemplate = this._tooltipContainerTemplate;
        }
    }
    get tooltipContainerTemplate() {
        return this._tooltipContainerTemplate;
    }
    _ensureTooltipCreated(createTooltip, createWrapper) {
        if (this._tooltipTemplate == null) {
            this.i.toolTip = null;
        }
        if (this._tooltipContent == null && this._tooltipTemplate != null) {
            let tooltip = createTooltip();
            if (tooltip == null) {
                return;
            }
            this._tooltipContent = tooltip;
            tooltip.tooltipTemplate = this._tooltipTemplate;
            this.i.toolTip = createWrapper(tooltip);
        }
    }
    _ensureTooltipDestroyed() {
        if (this._tooltipContent !== null) {
            //this._tooltipContent.destroy();
            this._tooltipContent = null;
        }
    }
    _provideRenderer(renderer) {
        this._renderer = renderer;
    }
    static _createFromInternal(internal) {
        if (!internal) {
            return null;
        }
        if (!internal.$type) {
            return null;
        }
        let name = internal.$type.name;
        let externalName = "Igr" + name;
        if (!TypeRegistrar.isRegistered(externalName)) {
            return null;
        }
        return TypeRegistrar.create(externalName);
    }
    /**
 * Gets whether the series is an annotation layer.
*
* ```ts
* let isAnnotationLayer: boolean = this.series.isAnnotationLayer;
* ```
*/
    get isAnnotationLayer() {
        return this.i.cj;
    }
    /**
     * Gets whether the current series is oriented vertically.
    *
    * ```ts
    * let isVertical: boolean = this.series.isVertical;
    * ```
    */
    get isVertical() {
        return this.i.isVertical;
    }
    /**
     * Gets whether the current series is a stack fragment.
    *
    * ```ts
    * let isFragment: boolean = this.series.isFragment;
    * ```
    */
    get isFragment() {
        return this.i.cs;
    }
    /**
     * Gets whether the current series shows an area or line shape.
    *
    * ```ts
    * let isAreaorLine: boolean = this.series.isAreaorLine;
    * ```
    */
    get isAreaOrLine() {
        return this.i.ck;
    }
    /**
     * Gets whether the current series is a polar type series.
    *
    * ```ts
    * let isPolar: boolean = this.series.isPolar;
    * ```
    */
    get isPolar() {
        return this.i.c0;
    }
    /**
     * Gets whether the current series is a scatter type series.
    *
    * ```ts
    * let isScatter: boolean = this.series.isScatter;
    * ```
    */
    get isScatter() {
        return this.i.c4;
    }
    /**
     * Gets whether the current series is a radial type series.
    *
    * ```ts
    * let isRadial: boolean = this.series.isRadial;
    * ```
    */
    get isRadial() {
        return this.i.c2;
    }
    /**
     * Gets whether the current series is a stacked type series.
    *
    * ```ts
    * let isStacked: boolean = this.series.isStacked;
    * ```
    */
    get isStacked() {
        return this.i.isStacked;
    }
    /**
     * Gets whether the current series is a financial type series.
    *
    * ```ts
    * let isFinancial: boolean = this.series.isFinancial;
    * ```
    */
    get isFinancial() {
        return this.i.cr;
    }
    /**
     * Gets whether the current series is a range type series.
    *
    * ```ts
    * let isRange: boolean = this.series.isRange;
    * ```
    */
    get isRange() {
        return this.i.c3;
    }
    /**
     * Gets whether the current series is a category type series.
    *
    * ```ts
    * let isCategory: boolean = this.series.isCategory;
    * ```
    */
    get isCategory() {
        return this.i.cl;
    }
    /**
     * Gets whether the current seires is a geogrpahic series.
    *
    * ```ts
    * let isGeographic: boolean = this.series.isGeographic;
    * ```
    */
    get isGeographic() {
        return this.i.ct;
    }
    /**
     * Gets whether the current series is a shape type series.
    */
    get isShape() {
        return this.i.c5;
    }
    /**
     * Gets whether the default crosshair behavior should be disabled if this series is present.
    *
    * `isDefaultCrosshairBehaviorDisabled` defaults to true for annotation layers. When not using annotaion layers, you can show crosshairs by setting the chart's `CrosshairVisibility` to true.
    *
    * ```ts
    * let isDefaultCrosshairBehaviorDisabled: boolean = this.series.isDefaultCrosshairBehaviorDisabled;
    * ```
    */
    get isDefaultCrosshairBehaviorDisabled() {
        return this.i.cm;
    }
    /**
     * Gets whether the default tooltip behavior should be disabled if this series is present.
    *
    * ```ts
    *  let isDefaultTooltipBehaviorDisabled: boolean = this.series.isDefaultTooltipBehaviorDisabled;
    * ```
    */
    get isDefaultTooltipBehaviorDisabled() {
        return this.i.cn;
    }
    /**
     * Returns whether the current series supports visual markers.
    *
    * ```ts
    * let hasMarkers: boolean = this.series.hasMarkers;
    * ```
    */
    get hasMarkers() {
        return this.i.hasMarkers;
    }
    /**
     * Gets if the series uses an index, which can be used to auto-assign it a color.
    *
    * ```ts
    * let isIndexed: boolean = this.series.isIndexed;
    * ```
    */
    get isIndexed() {
        return this.i.cw;
    }
    /**
     * Gets if the series should appear in any legends.
    *
    * ```ts
    * let isUsableInLegend: boolean = this.series.isUsableInLegend;
    * ```
    */
    get isUsableInLegend() {
        return this.i.isUsableInLegend;
    }
    /**
     * Gets or sets the legend item visibility for the current series object.
    *
    * The `LegendItemVisibilty` can be used to exclude only certain `IgrSeries` from the `IgrLegend`.
    */
    get legendItemVisibility() {
        return this.i.ls;
    }
    set legendItemVisibility(v) {
        this.i.ls = ensureEnum(Visibility_$type, v);
    }
    /**
     * Gets or sets the LegendItemBadgeTemplate property.
     * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by
     * the series object itself.
    *
    * The `legendItemBadgeTemplate` is used to describe the visual structure of the badge icon for each legend item.
    */
    get legendItemBadgeTemplate() {
        return this.i.legendItemBadgeTemplate;
    }
    set legendItemBadgeTemplate(v) {
        this.i.legendItemBadgeTemplate = v;
    }
    /**
     * Gets or sets the LegendItemTemplate property.
     * The legend item control content is created according to the LegendItemTemplate on-demand by
     * the series object itself.
    *
    * The `legendItemTemplate` is used to describe the visual structure of each legend item in the `IgrLegend`.
    */
    get legendItemTemplate() {
        return this.i.legendItemTemplate;
    }
    set legendItemTemplate(v) {
        this.i.legendItemTemplate = v;
    }
    /**
     * Gets or sets the DiscreteLegendItemTemplate property.
     * The legend item control content is created according to the DiscreteLegendItemTemplate on-demand by
     * the series object itself.
    *
    * The legend item control content is created according to the DiscreteLegendItemTemplate on-demand by the series object itself
    */
    get discreteLegendItemTemplate() {
        return this.i.jr;
    }
    set discreteLegendItemTemplate(v) {
        this.i.jr = v;
    }
    /**
     * Gets or sets the easing function used to morph the current series.
    *
    * The `TransitioninDuration` and `transitionEasingFunction` can be used to play animation when data is added or removed from a `IgrSeries`. To play an initial animation see `transitionInDuration`.
    *
    * ```ts
    * this.series.transitionEasingFunction =  EasingFunctions.cubicEase;
    * ```
    */
    get transitionEasingFunction() {
        return this.i.bu;
    }
    set transitionEasingFunction(v) {
        this.i.bu = v;
    }
    /**
     * Gets or sets the EasingFunction used to morph the current series during the initial transition.
    *
    * The `transitionInEasingFunction` can be used with `IsTransitionInEnabled` to cofigure the animation when a new datasource is loaded.
    *
    * ```ts
    * this.series.transitionInEasingFunction =  EasingFunctions.cubicEase;
    * ```
    */
    get transitionInEasingFunction() {
        return this.i.bv;
    }
    set transitionInEasingFunction(v) {
        this.i.bv = v;
    }
    /**
     * Gets or sets the duration of the current series's morph.
    *
    * The `transitionDuration` can be used to play animation when data is added or removed from a `IgrSeries`. To play an initial animation see `transitionInDuration`.
    *
    * ```ts
    * this.series.transitionDuration = 500;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     isTransitionInEnabled=true
    *     transitionInSpeedType="indexScaled"
    *     transitionDuration=500
    *     transitionInDuration=500 />
    *  </IgrDataChart>
    * ```
    */
    get transitionDuration() {
        return this.i.ff;
    }
    set transitionDuration(v) {
        this.i.ff = +v;
    }
    /**
     * Gets or sets the current series object's rendering resolution.
    *
    * Setting the `resolution` on a Series to a higher value can help with performance, but it will lower the graphical fidelity of the line. As such, it can be increased up until the fidelity is unacceptable.
    *
    * ```ts
    * this.series.resolution = 1.5;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     resolution=1.5 />
    *  </IgrDataChart>
    * ```
    */
    get resolution() {
        return this.i.er;
    }
    set resolution(v) {
        this.i.er = +v;
    }
    /**
     * Gets or sets the Title property.
     * The legend item control is created according to the Title on-demand by
     * the series object itself.
    *
    * The `IgrSeries` `title` may be used in tooltips and legends.
    *
    * ```ts
    * this.series.title = "InStock Items";
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *    title="InStock Items" />
    *  </IgrDataChart>
    * ```
    */
    get title() {
        return this.i.fs;
    }
    set title(v) {
        this.i.fs = v;
    }
    /**
     * Gets or sets the brush to use for the series.
    *
    * The `brush` along with the `outline` and `Negative Brush` can be used to affect the visuals of the `IgrSeries`.
    *
    * ```ts
    * this.series.brush = "red";
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     brush="Gray"
    *     outline="Black" />
    *  </IgrDataChart>
    * ```
    */
    get brush() {
        return brushToString(this.i.ky);
    }
    set brush(v) {
        this.i.ky = stringToBrush(v);
    }
    /**
     * Gets the effective brush for the current series object.
    *
    * ```ts
    * let actualBrush: string = series.actualBrush;
    * ```
    */
    get actualBrush() {
        return brushToString(this.i.kw);
    }
    set actualBrush(v) {
        this.i.kw = stringToBrush(v);
    }
    /**
     * Gets or sets the brush to use for the outline of the series.
     * Some series types, such as LineSeries, do not display outlines.  Therefore, this property does not affect some charts.
    *
    * The `outline` along with the `brush` and `NegativeBrush` can be used to affect the visuals of the `IgrSeries`.
    *
    * ```ts
    * this.series.brush = "red";
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     brush="Gray"
    *     outline="Black" />
    *  </IgrDataChart>
    * ```
    */
    get outline() {
        return brushToString(this.i.k1);
    }
    set outline(v) {
        this.i.k1 = stringToBrush(v);
    }
    /**
     * Gets the effective outline for the current series object.
    *
    * ```ts
    * let actualOutline: string = series.ActualOutline;
    * ```
    */
    get actualOutline() {
        return brushToString(this.i.kx);
    }
    set actualOutline(v) {
        this.i.kx = stringToBrush(v);
    }
    /**
     * Gets or sets the width of the current series object's line thickness.
    *
    * Depending on the `IgrSeries` type, this can be the main brush used, or just the outline. For example, when using a `IgrLineSeries` it will affect the thickness of the lines drawn, whereas when using a `IgrColumnSeries` it will affect the outer border thickness of the columns.
    *
    * ```ts
    * this.series.thickness=5;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     thickness=5 />
    *  </IgrDataChart>
    * ```
    */
    get thickness() {
        return this.i.ev;
    }
    set thickness(v) {
        this.i.ev = +v;
    }
    /**
     * Gets or sets whether highlighting should be enabled for this series, if this type of series supports highlighting.
    *
    * ```ts
    * this.series.isHighlightingEnabled = true;
    * ```
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     isHighlightingEnabled="true" />
    *  </IgrDataChart>
    * ```
    */
    get isHighlightingEnabled() {
        return this.i.cu;
    }
    set isHighlightingEnabled(v) {
        this.i.cu = ensureBool(v);
    }
    /**
     * Gets or sets whether drop shadow should be enabled for this series.
    *
    * `isDropShadowEnabled` is used to decide whether drop shadow should be enabled for this series.
    *
    * ```ts
    * this.series.isDropShadowEnabled = true;
    * ```
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     isDropShadowEnabled="true" />
    *  </IgrDataChart>
    * ```
    */
    get isDropShadowEnabled() {
        return this.i.cp;
    }
    set isDropShadowEnabled(v) {
        this.i.cp = ensureBool(v);
    }
    /**
     * Gets or sets the shadow blur.
     * This property is ignored when Series.UseSingleShadow is set to true.
    *
    * `shadowBlur` can be set in conjection with `isDropShadowEnabled` to further define the drop shadow effect.
    *
    * ```ts
    * this.series.shadowBlur = 7;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     shadowBlur="7"
    *     shadowColor="blue" />
    *  </IgrDataChart>
    * ```
    */
    get shadowBlur() {
        return this.i.es;
    }
    set shadowBlur(v) {
        this.i.es = +v;
    }
    /**
     * Gets or sets the drop shadow color.
    *
    * `shadowColor` can be set in conjection with `isDropShadowEnabled` to further define the drop shadow effect.
    *
    * ```ts
    * this.series.shadowColor = "blue";
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     shadowBlur="7"
    *     shadowColor="blue" />
    *  </IgrDataChart>
    * ```
    */
    get shadowColor() {
        return colorToString(this.i.k3);
    }
    set shadowColor(v) {
        this.i.k3 = stringToColor(v);
    }
    /**
     * Gets or sets whether drop shadow is applied to the whole series visual or to each of the individual shapes forming the series.
     * When this property is set to true, no Series.ShadowBlur is applied.
    *
    * ```ts
    * this.series.useSingleShadow = true;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     isDropShadowEnabled=true
    *     markerType="circle"
    *     useSingleShadow=true />
    *  </IgrDataChart>
    * ```
    */
    get useSingleShadow() {
        return this.i.dt;
    }
    set useSingleShadow(v) {
        this.i.dt = ensureBool(v);
    }
    /**
     * Gets or sets the drop shadow x-offset.
    *
    * `shadowOffsetX` can be set in conjection with `isDropShadowEnabled` to further define the drop shadow effect.
    *
    * ```ts
    * this.series.shadowOffsetX = 10;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     shadowOffsetX="10"
    *     shadowOffsetY="10" />
    *  </IgrDataChart>
    * ```
    */
    get shadowOffsetX() {
        return this.i.et;
    }
    set shadowOffsetX(v) {
        this.i.et = +v;
    }
    /**
     * Gets or sets the drop shadow y-offset.
    *
    * `shadowOffsetY` can be set in conjection with `isDropShadowEnabled` to further define the drop shadow effect.
    *
    * ```ts
    * this.series.shadowOffsetY = 10;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     shadowOffsetX="10"
    *     shadowOffsetY="10" />
    *  </IgrDataChart>
    * ```
    */
    get shadowOffsetY() {
        return this.i.eu;
    }
    set shadowOffsetY(v) {
        this.i.eu = +v;
    }
    /**
     * Gets or sets the opacity applied to the area fill visual.
     * This property only applies to series that have area visual.
    */
    get areaFillOpacity() {
        return this.i.d4;
    }
    set areaFillOpacity(v) {
        this.i.d4 = +v;
    }
    /**
     * Gets the actual opacity applied to the area fill visual.
    *
    * ```ts
    * let actualFillOpacity: number = series.actualAreaFillOpacity;
    * ```
    */
    get actualAreaFillOpacity() {
        return this.i.d3;
    }
    set actualAreaFillOpacity(v) {
        this.i.d3 = +v;
    }
    /**
     * Gets if the default tooltip has been selected for display.
    *
    * To use the default tooltip set `showDefaultTooltip` to true.
    *
    * ```ts
    * let isDefaultToolTipSelected: boolean = this.series.isDefaultToolTipSelected;
    * ```
    */
    get isDefaultToolTipSelected() {
        return this.i.co;
    }
    set isDefaultToolTipSelected(v) {
        this.i.co = ensureBool(v);
    }
    /**
     * Gets or sets whether default tooltip will be shown.
    *
    * The default tooltips display all the information relevant to the particular series item (series title, data values, axis values etc.) and are styled to match the series' style. When using default tooltips, you should also set the series `title`.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     showDefaultTooltip="true"
    *     title="InStock Items" />
    *  </IgrDataChart>
    * ```
    */
    get showDefaultTooltip() {
        return this.i.dc;
    }
    set showDefaultTooltip(v) {
        this.i.dc = ensureBool(v);
    }
    /**
     * Gets or sets the duration of the current series's transition in morph.
    *
    * The `transitionInDuration` can be used with `IsTransitionInEnabled` to cofigure the animation when a new datasource is loaded.
    *
    * ```ts
    * this.series.transitionDuration = 500;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     isTransitionInEnabled=true
    *     transitionInSpeedType="indexScaled"
    *     transitionDuration=500
    *     transitionInDuration=500 />
    *  </IgrDataChart>
    * ```
    */
    get transitionInDuration() {
        return this.i.fg;
    }
    set transitionInDuration(v) {
        this.i.fg = +v;
    }
    /**
     * Gets or sets the duration of the current series's transition in morph.
    *
    * The `transitionInSpeedType` can be used with `IsTransitionInEnabled` to cofigure the animation when a new datasource is loaded.
    *
    * ```ts
    * this.series.transitionInSpeedType = TransitionInSpeedType.IndexScaled;
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"
    *     isTransitionInEnabled=true
    *     transitionInSpeedType="indexScaled"
    *     transitionDuration=500
    *     transitionInDuration=500 />
    *  </IgrDataChart>
    * ```
    */
    get transitionInSpeedType() {
        return this.i.bp;
    }
    set transitionInSpeedType(v) {
        this.i.bp = ensureEnum(TransitionInSpeedType_$type, v);
    }
    /**
     * Gets or sets the whether the chart reacts to mouse move events.
    */
    get mouseOverEnabled() {
        return this.i.c6;
    }
    set mouseOverEnabled(v) {
        this.i.c6 = ensureBool(v);
    }
    /**
     * Gets or sets the coercion methods to use when loading data from data sources.
     * Should be specified before setting any member paths, if being used. Setting it later
     * will not cause data to be reimported into the chart.
    *
    * &lt;-- position: content member-->
    *
    * ```ts
    * cMethods: any = {
    *     ValueCoercion: function(value:number): number {return value+2;}
    *  }
    * ```
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrScatterPolygonSeries
    *      name="series1"
    *      shapeMemberPath="Points"
    *      title="House Floor Plan"
    *      brush="Gray"
    *      outline="Black" />
    *  </IgrDataChart>
    * ```
    */
    get coercionMethods() {
        return this.i.coercionMethods;
    }
    set coercionMethods(v) {
        this.i.coercionMethods = v;
    }
    /**
     * Gets or sets whether the series should expect that properties in its items source may be functions that need to be
     * evaluated to yield their value. This defaults to false, as there will be a subtle performance impact to using this feature.
     * This value must be set before assigning an item's source to take effect.
    *
    * `expectFunctions` is used to decide whether the series should expect that its data source members need to be called as functions to get their values.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrNumericXAxis name="xAxis" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrAreaSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="MyFunction"
    *     expectFunctions="true"/>
    *  </IgrDataChart>
    * ```
    */
    get expectFunctions() {
        return this.i.expectFunctions;
    }
    set expectFunctions(v) {
        this.i.expectFunctions = ensureBool(v);
    }
    /**
     * Method of hit testing to use when pointing to items in this series.
    *
    * The `hitTestMode` can be set to either:
    *
    * -   `Auto`: automatically decide the appropriate hit test mode for the series.
    * -   `ColorEncoded`: use a color encoded off screen buffer for hit testing. Should always be O(1) time for determining a hit series. This increases frame render time and memory usage, however. Consider using this if hit testing time is degrading performance.
    * -   `Computational`: use a computational based approach to determine whether the series has been hit. This uses loose bounding boxes, in some cases, and can range in time complexity between O(1) and O(log n) to find a hit. This decreases frame render time compared to color encoded
    *
    * ```ts
    * this.series.hitTestMode = SeriesHitTestMode.Computational;
    * ```
    */
    get hitTestMode() {
        return this.i.be;
    }
    set hitTestMode(v) {
        this.i.be = ensureEnum(SeriesHitTestMode_$type, v);
    }
    /**
     * Resolved method of hit testing to use when pointing to items in the chart.
    *
    * ```ts
    * let hitTestMode: SeriesHitTestMode = this.series.actualHitTestMode;
    * ```
    */
    get actualHitTestMode() {
        return this.i.bc;
    }
    set actualHitTestMode(v) {
        this.i.bc = ensureEnum(SeriesHitTestMode_$type, v);
    }
    /**
     * Overridden by derived series classes to indicate when negative colors are supported or not.
    */
    get isNegativeColorSupported() {
        return this.i.cz;
    }
    /**
     * Overridden by derived series classes to indicate when markerless display is preferred or not.
    */
    get isMarkerlessDisplayPreferred() {
        return this.i.cy;
    }
    /**
     * The final value of this series.
    */
    get finalValue() {
        return this.i.d5;
    }
    set finalValue(v) {
        this.i.d5 = +v;
    }
    /**
     * The percent change from the beginning to the end of this series.
    */
    get percentChange() {
        return this.i.eq;
    }
    set percentChange(v) {
        this.i.eq = +v;
    }
    /**
 * Gets the brush for tooltip labels.

*/
    resolveTooltipBrush() {
        let iv = this.i.gp();
        return (iv);
    }
    /**
     * Gets the precise item index, if possible, based on the closeness to the previous or next whole integer. If the series cannot provide this information, GetExactItemIndex will return the same integer value as GetItemIndex.
    
    * @param world  * The world position for which to return the index.
    *
    * ```ts
    * let index: number = this.series.getExactItemIndex({x:.5,y:.5});
    * ```
    */
    getExactItemIndex(world) {
        let iv = this.i.d8(toPoint(world));
        return (iv);
    }
    /**
     * Gets the item item index associated with the specified world position
    
    *
    * ```ts
    * let index: number = this.series.getItemIndex({x:.5,y:.5});
    * ```
    */
    getItemIndex(world) {
        let iv = this.i.e5(toPoint(world));
        return (iv);
    }
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    *
    * ```ts
    * let item: number = this.series.getItem({x:.5,y:.5});
    * ```
    */
    getItem(world) {
        let iv = this.i.fm(toPoint(world));
        return (iv);
    }
    getPreviousOrExactIndex(world, skipUnknowns) {
        let iv = this.i.fb(toPoint(world), skipUnknowns);
        return (iv);
    }
    getNextOrExactIndex(world, skipUnknowns) {
        let iv = this.i.e9(toPoint(world), skipUnknowns);
        return (iv);
    }
    getSeriesValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ek(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.le(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    /**
     * If possible, will return the best available value bounding box within the series that has the best value match for the world position provided.
    
    * @param world  * The world coordinate for which to get a value bounding box for
    */
    getSeriesValueBoundingBox(world) {
        let iv = this.i.ln(toPoint(world));
        return fromRect(iv);
    }
    /**
     * If possible, will return the best available value marker bounding box within the series that has the best value match for the world position provided.
    
    * @param world  * The world coordinates for which to get a value marker bounding box for
    */
    getSeriesValueMarkerBoundingBox(world) {
        let iv = this.i.lp(toPoint(world));
        return fromRect(iv);
    }
    getSeriesHighValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.eg(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesHighValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.la(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    getSeriesLowValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ei(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getSeriesLowValuePosition(world, useInterpolation, skipUnknowns) {
        let iv = this.i.lc(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    getSeriesValuePositionFromSeriesPixel(mouse, useInterpolation, skipUnknowns) {
        let iv = this.i.lf(toPoint(mouse), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    }
    getSeriesValueFromSeriesPixel(mouse, useInterpolation, skipUnknowns) {
        let iv = this.i.el(toPoint(mouse), useInterpolation, skipUnknowns);
        return (iv);
    }
    /**
     * For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned.
    
    *
    * ```ts
    * let span: number = this.series.getItemSpan();
    * ```
    */
    getItemSpan() {
        let iv = this.i.ed();
        return (iv);
    }
    /**
     * Converts a point from coordinates within the series plot area to a world position within axis space.
    
    * @param seriesPoint  * The pixel location within the plot area of the series.
    *
    * ```ts
    * this.series.toWorldPosition({x:500,y:500});
    * ```
    */
    toWorldPosition(seriesPoint) {
        let iv = this.i.lh(toPoint(seriesPoint));
        return fromPoint(iv);
    }
    /**
     * Converts a point from world coordinates to coordinates within the viewport of the series.
    
    * @param world  * The world position from which to convert.
    */
    fromWorldPosition(world) {
        let iv = this.i.k9(toPoint(world));
        return fromPoint(iv);
    }
    /**
     * Requests that the provided item should be brought into view if possible.
    
    * @param item  * The item to attempt to bring into view.
    *
    * ```ts
    * this.series.scrollIntoView(dataItem);
    * ```
    */
    scrollIntoView(item) {
        let iv = this.i.c8(item);
        return (iv);
    }
    /**
     * Renders the series.
    
    * @param animate  * True if the change should be animated.
    *
    * ```ts
    * this.series.renderSeries(true);
    * ```
    */
    renderSeries(animate) {
        this.i.i6(animate);
    }
    /**
     * Gets the effective viewport, adjusted to account for margins and other factors.
    
    */
    getEffectiveViewport() {
        let iv = this.i.getEffectiveViewport();
        return fromRect(iv);
    }
    /**
     * Removes all alternate views of this series.
    
    */
    removeAllAlternateViews() {
        this.i.i0();
    }
    /**
     * Removes an alternate view of this series.
    
    * @param viewIdentifier  * The string identifier for the view to remove.
    */
    removeAlternateView(viewIdentifier) {
        this.i.i2(viewIdentifier);
    }
    /**
     * Replays the assigned transition in animation, if any.
    
    *
    * ```ts
    * this.series.replayTransitionIn();
    * ```
    */
    replayTransitionIn() {
        this.i.i9();
    }
    /**
     * Call to null out the axes of the series;
    
    */
    removeAxes() {
        this.i.i3();
    }
    /**
     * Simulates a pointer hover over the series surface.
    
    * @param point  * The pointer position relative to the series viewport over which to hover.
    *
    * When tooltips are enabled, `simulateHover` can be used to automatically display the tooltip over a particular series item.
    *
    * ```ts
    * this.series.simulateHover({x:250,y:250});
    * ```
    */
    simulateHover(point) {
        this.i.jd(toPoint(point));
    }
    /**
     * Called when this series' Style is updated.
    
    */
    styleUpdated() {
        this.i.jf();
    }
    setNegativeColors(negativeBrush, negativeOutline) {
        this.i.jb(stringToBrush(negativeBrush), stringToBrush(negativeOutline));
    }
    /**
     * Moves the cursor point to the provided world position. Some series may react to the current cursor position.
    
    * @param point  * The cursor point, in world coordinates.
    *
    * `moveCursorPoint` can be used on annotation layers to programitically show the annotation at the given point.
    *
    * ```ts
    * this.crosshair.moveCursorPoint({x:.5,y:.5});
    * ```
    */
    moveCursorPoint(point) {
        this.i.h5(toPoint(point));
    }
    /**
     * This event is raised every time a render has been requested from a series.
    */
    get renderRequested() {
        return this._renderRequested;
    }
    set renderRequested(ev) {
        if (this._renderRequested_wrapped !== null) {
            this.i.renderRequested = delegateRemove(this.i.renderRequested, this._renderRequested_wrapped);
            this._renderRequested_wrapped = null;
            this._renderRequested = null;
        }
        this._renderRequested = ev;
        this._renderRequested_wrapped = (o, e) => {
            let outerArgs = new RenderRequestedEventArgs();
            outerArgs._provideImplementation(e);
            if (this.beforeRenderRequested) {
                this.beforeRenderRequested(this, outerArgs);
            }
            if (this._renderRequested) {
                this._renderRequested(this, outerArgs);
            }
        };
        this.i.renderRequested = delegateCombine(this.i.renderRequested, this._renderRequested_wrapped);
    }
}
