UNPKG

igniteui-webcomponents-charts

Version:

Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.

1,724 lines 64.1 kB
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { XamDataLegend } from "./XamDataLegend";
import { arrayFindByName, brushToString, stringToBrush, ensureBool, ensureEnum, initializePropertiesFromCss, NamePatcher, toSpinal, fromSpinal, enumToString, getAllPropertyNames } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
import { FontInfo } from "igniteui-webcomponents-core";
import { WebComponentRenderer } from "igniteui-webcomponents-core";
import { IgcHTMLElement } from "igniteui-webcomponents-core";
import { Thickness } from "igniteui-webcomponents-core";
import { DataAbbreviationMode_$type } from "igniteui-webcomponents-core";
import { DataLegendHeaderTimeMode_$type } from "igniteui-webcomponents-core";
import { DataLegendHeaderDateMode_$type } from "igniteui-webcomponents-core";
import { DataLegendUnitsMode_$type } from "igniteui-webcomponents-core";
import { DataLegendLabelMode_$type } from "igniteui-webcomponents-core";
import { DataLegendValueMode_$type } from "igniteui-webcomponents-core";
import { DataLegendLayoutMode_$type } from "igniteui-webcomponents-core";
import { DataLegendSummaryType_$type } from "igniteui-webcomponents-core";
import { IgcDataLegendSummaryEventArgs } from './igc-data-legend-summary-event-args';
import { IgcDataLegendStylingRowEventArgs } from './igc-data-legend-styling-row-event-args';
import { IgcDataLegendStylingColumnEventArgs } from './igc-data-legend-styling-column-event-args';
import { LegendItemBadgeShape_$type } from "igniteui-webcomponents-core";
const DataLegendStylingDefaults = {};
/**
 * Represents data legend that displays information about each series including values and summaries.
*/
export let IgcDataLegendComponent = /*@__PURE__*/ (() => {
    class IgcDataLegendComponent extends IgcHTMLElement {
        set height(value) {
            this._height = value;
            this.style.height = value;
            this._dataLegend.notifySizeChanged();
        }
        get height() {
            return this._height;
        }
        set width(value) {
            this._width = value;
            this.style.width = value;
            this._dataLegend.notifySizeChanged();
        }
        get width() {
            return this._width;
        }
        constructor() {
            super();
            this._wrapper = null;
            this._renderer = null;
            this._disconnected = false;
            this._implementation = null;
            this._settingAttributes = false;
            this._attached = false;
            this._queuedSetAttributes = [];
            this._updatingFromAttribute = false;
            this.__p = null;
            this._hasUserValues = new Set();
            this._stylingContainer = null;
            this._stylingParent = null;
            this._inStyling = false;
            this._calculateColumnSummary = null;
            this._calculateColumnSummary_wrapped = null;
            this._styleHeaderRow = null;
            this._styleHeaderRow_wrapped = null;
            this._styleGroupRow = null;
            this._styleGroupRow_wrapped = null;
            this._styleSeriesRow = null;
            this._styleSeriesRow_wrapped = null;
            this._styleSummaryRow = null;
            this._styleSummaryRow_wrapped = null;
            this._styleSeriesColumn = null;
            this._styleSeriesColumn_wrapped = null;
            this._styleSummaryColumn = null;
            this._styleSummaryColumn_wrapped = null;
            if (this._styling) {
                NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
            }
            this._implementation = this.createImplementation();
            this._renderer = new WebComponentRenderer(this, document, true, DataLegendStylingDefaults);
            this._container = this._renderer.createElement("div");
            this._renderer.updateRoot(this._container);
            //this._renderer.rootWrapper.append(this._container);
            this._container.setStyleProperty("display", "block");
            this._container.setStyleProperty("width", "100%");
            this._container.setStyleProperty("height", "100%");
            var root;
            root = this._container;
            if (this._container.getNativeElement() != null) {
                root = this._container.getNativeElement();
            }
            this._wrapper = this._renderer;
            var dataLegend = this.i;
            this._dataLegend = dataLegend;
            this._dataLegend.externalObject = this;
            dataLegend.provideContainer(this._renderer);
            dataLegend.notifySizeChanged();
            this._renderer.addSizeWatcher(() => {
                this._dataLegend.notifySizeChanged();
            });
        }
        disconnectedCallback() {
            this._disconnected = true;
            if (this.i) {
                this.i.onDetachedFromUI();
            }
        }
        connectedCallback() {
            if (this._disconnected) {
                this._disconnected = false;
                if (this.i) {
                    this.i.onAttachedToUI();
                }
                return;
            }
            this.classList.add("ig-data-legend");
            this.classList.add("igc-data-legend");
            this.appendChild(this._renderer.rootWrapper.getNativeElement());
            this._attached = true;
            this.style.display = "block";
            this.style.height = this._height;
            this.style.width = this._width;
            this._flushQueuedAttributes();
            // supports themes or custom properties set in CSS 
            this._styling(this, this);
            this.afterContentInit();
        }
        afterContentInit() {
            this._dataLegend.notifySizeChanged();
        }
        // supports themes or custom properties set in CSS
        updateStyle() {
            this._styling(this, this);
        }
        createImplementation() {
            return new XamDataLegend();
        }
        get i() {
            return this._implementation;
        }
        static _staticStyling(container, component, parent) {
            let genericPrefix = "";
            let typeName = (component.i ? component.i : component).$type.name;
            if (typeName.indexOf("Xam") === 0) {
                typeName = typeName.substring(3);
            }
            genericPrefix = toSpinal("DataLegend");
            let additionalPrefixes = [];
            let prefix = toSpinal(typeName);
            additionalPrefixes.push(prefix + "-");
            let b = (component.i ? component.i : component).$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);
                }
                let basePrefix = toSpinal(typeName);
                additionalPrefixes.push(basePrefix + "-");
                b = b.baseType;
            }
            if (parent) {
                let parentTypeName = parent.i.$type.name;
                if (parentTypeName.indexOf("Xam") === 0) {
                    parentTypeName = parentTypeName.substring(3);
                }
                let parentPrefix = toSpinal(parentTypeName);
                additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
                additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
            }
            initializePropertiesFromCss(container, component, genericPrefix + "-", new Set(), false, additionalPrefixes);
        }
        destroy() {
            this.i.destroy();
            this._wrapper.destroy();
        }
        //private desiredSizeChanged(width: number, height: number) {
        //    //this.style.minWidth = width + "px";
        //    //this.style.minHeight = height + "px";
        //    //if (this.width == undefined || this.width == '') {
        //    //    this.style.width = width + "px";
        //    //}
        //    //if (this.height == undefined || this.height == '') {
        //    //    this.style.height = height + "px";
        //    //}
        //    this._dataLegend.notifySizeChanged();
        //}
        /**
         * Gets or sets the target for the data legend.
        */
        get target() {
            var ret = this.i.target;
            if (!ret) {
                return ret;
            }
            if (ret.externalObject != null) {
                ret = ret.externalObject;
            }
            return ret;
        }
        set target(v) {
            if (v && v._implementation) {
                v = v._implementation;
            }
            this.i.target = v;
        }
        _enqueueSetAttribute(attrName, attrValue) {
            this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue });
        }
        _flushQueuedAttributes() {
            this._settingAttributes = true;
            for (let i = 0; i < this._queuedSetAttributes.length; i++) {
                this.setAttribute(this._queuedSetAttributes[i].attrName, this._queuedSetAttributes[i].attrValue);
            }
            this._settingAttributes = false;
            this._queuedSetAttributes.length = 0;
        }
        _a(attrName, attrValue) {
            if (this._updatingFromAttribute) {
                return;
            }
            if (attrValue) {
                attrValue = attrValue.toString();
            }
            this._settingAttributes = true;
            attrName = toSpinal(attrName);
            if (this._attached) {
                this.setAttribute(attrName, attrValue);
            }
            else {
                this._enqueueSetAttribute(attrName, attrValue);
            }
            this._settingAttributes = false;
        }
        static get observedAttributes() {
            if (IgcDataLegendComponent._observedAttributesIgcDataLegendComponent == null) {
                let names = getAllPropertyNames(IgcDataLegendComponent);
                for (let i = 0; i < names.length; i++) {
                    names[i] = toSpinal(names[i]);
                }
                IgcDataLegendComponent._observedAttributesIgcDataLegendComponent = names;
            }
            return IgcDataLegendComponent._observedAttributesIgcDataLegendComponent;
        }
        attributeChangedCallback(name, oldValue, newValue) {
            if (this._settingAttributes) {
                return;
            }
            let setName = fromSpinal(name);
            this._updatingFromAttribute = true;
            this[setName] = newValue;
            this._updatingFromAttribute = false;
        }
        static register() {
            if (!IgcDataLegendComponent._isElementRegistered) {
                IgcDataLegendComponent._isElementRegistered = true;
                RegisterElementHelper.registerElement(IgcDataLegendComponent.htmlTagName, IgcDataLegendComponent);
            }
        }
        /**
     * Gets whether or not at least one badge is visible based on BadgesShape and setting of a row's IsVisble in StyleSeriesRow event
    */
        get actualBadgesVisible() {
            return this.i.b0;
        }
        set actualBadgesVisible(v) {
            this.i.b0 = ensureBool(v);
            this._a("actualBadgesVisible", this.i.b0);
        }
        /**
         * Gets the actual pixel scaling ratio 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 actualPixelScalingRatio() {
            return this.i.cs;
        }
        set actualPixelScalingRatio(v) {
            this.i.cs = +v;
            this._a("actualPixelScalingRatio", this.i.cs);
        }
        /**
         * Gets or sets whether the legend is embedded in a DataTooltip
        */
        get isEmbeddedInDataTooltip() {
            return this.i.isEmbeddedInDataTooltip;
        }
        set isEmbeddedInDataTooltip(v) {
            this.i.isEmbeddedInDataTooltip = ensureBool(v);
            this._a("isEmbeddedInDataTooltip", this.i.isEmbeddedInDataTooltip);
        }
        /**
         * Gets or sets indexes, titles, or names of series to include in displaying in the data legend, e.g. "0, 1" or "Series1 Title, Series2 Title"
         * The ExcludedSeries property takes precedence over values of IncludedSeries property
        */
        get includedSeries() {
            return this.i.includedSeries;
        }
        set includedSeries(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.includedSeries = v;
        }
        /**
         * Gets or sets indexes, titles, or names of series to exclude from displaying in the data legend, e.g. "0, 1" or "Series1 Title, Series2 Title"
         * The ExcludedSeries property takes precedence over values of IncludedSeries property
        */
        get excludedSeries() {
            return this.i.excludedSeries;
        }
        set excludedSeries(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.excludedSeries = v;
        }
        /**
         * Gets or sets names of data columns or their labels to include in displaying in the data legend, e.g. "High, Low" or "H, L"
         * The ExcludedColumns property takes precedence over values of IncludedColumns property
        */
        get includedColumns() {
            return this.i.includedColumns;
        }
        set includedColumns(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.includedColumns = v;
        }
        /**
         * Gets or sets names of data columns or their labels to exclude from displaying in the data legend, e.g. "High, Low" or "H, L"
         * The ExcludedColumns property takes precedence over values of IncludedColumns property
        */
        get excludedColumns() {
            return this.i.excludedColumns;
        }
        set excludedColumns(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.excludedColumns = v;
        }
        /**
         * Gets or sets whether the data legend should update when the series data is mutated.
        */
        get shouldUpdateWhenSeriesDataChanges() {
            return this.i.b9;
        }
        set shouldUpdateWhenSeriesDataChanges(v) {
            this.i.b9 = ensureBool(v);
            this._a("shouldUpdateWhenSeriesDataChanges", this.i.b9);
        }
        /**
         * Gets or sets mode for abbreviating large numbers displayed in the legend
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get valueFormatAbbreviation() {
            return this.i.an;
        }
        set valueFormatAbbreviation(v) {
            this.i.an = ensureEnum(DataAbbreviationMode_$type, v);
            this._a("valueFormatAbbreviation", enumToString(DataAbbreviationMode_$type, this.i.an));
        }
        /**
         * Gets or sets maximum digits for formatting numbers displayed in the legend
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get valueFormatMaxFractions() {
            return this.i.cy;
        }
        set valueFormatMaxFractions(v) {
            this.i.cy = +v;
            this._a("valueFormatMaxFractions", this.i.cy);
        }
        /**
         * Gets or sets minimum digits for formatting numbers displayed in the legend
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get valueFormatMinFractions() {
            return this.i.cz;
        }
        set valueFormatMinFractions(v) {
            this.i.cz = +v;
            this._a("valueFormatMinFractions", this.i.cz);
        }
        /**
         * Gets or sets the mode for displaying values in the data legend, e.g. Currency ($500.25), Decimal (500.25), Integer (500)
        */
        get valueFormatMode() {
            return this.i.a5;
        }
        set valueFormatMode(v) {
            this.i.a5 = ensureEnum(DataLegendValueMode_$type, v);
            this._a("valueFormatMode", enumToString(DataLegendValueMode_$type, this.i.a5));
        }
        /**
         * Gets or sets globalization culture when displaying values as currencies, e.g. use "en-GB" to display British pound symbol when the ValueFormatMode property is set to 'Currency' mode
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get valueFormatCulture() {
            return this.i.e8;
        }
        set valueFormatCulture(v) {
            this.i.e8 = v;
        }
        /**
         * Gets or sets the currency code used for displaying currency symbol next to values, e.g. USD for $, EUR for €
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get valueFormatCurrencyCode() {
            return this.i.fa;
        }
        set valueFormatCurrencyCode(v) {
            this.i.fa = v;
        }
        /**
         * Gets or sets whether or not use grouping separator, e.g, 15,000 for 15000
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get valueFormatUseGrouping() {
            return this.i.ca;
        }
        set valueFormatUseGrouping(v) {
            this.i.ca = ensureBool(v);
            this._a("valueFormatUseGrouping", this.i.ca);
        }
        /**
         * Gets or sets the format string for values displayed in the data legend.
        */
        get valueFormatString() {
            return this.i.fg;
        }
        set valueFormatString(v) {
            this.i.fg = v;
        }
        /**
         * Gets or sets the format specifiers to use with the ValueFormatString string.
        */
        get valueFormatSpecifiers() {
            return this.i.ah;
        }
        set valueFormatSpecifiers(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ah = v;
        }
        get valueRowMarginBottom() {
            return this.i.jf ? this.i.jf.bottom : NaN;
        }
        set valueRowMarginBottom(v) {
            this.ensureValueRowMargin();
            this.i.jf.bottom = +v;
            this._a("valueRowMarginBottom", this.i.jf.bottom);
            this.i.jf = this.i.jf;
        }
        get valueRowMarginLeft() {
            return this.i.jf ? this.i.jf.left : NaN;
        }
        set valueRowMarginLeft(v) {
            this.ensureValueRowMargin();
            this.i.jf.left = +v;
            this._a("valueRowMarginLeft", this.i.jf.left);
            this.i.jf = this.i.jf;
        }
        get valueRowMarginRight() {
            return this.i.jf ? this.i.jf.right : NaN;
        }
        set valueRowMarginRight(v) {
            this.ensureValueRowMargin();
            this.i.jf.right = +v;
            this._a("valueRowMarginRight", this.i.jf.right);
            this.i.jf = this.i.jf;
        }
        get valueRowMarginTop() {
            return this.i.jf ? this.i.jf.top : NaN;
        }
        set valueRowMarginTop(v) {
            this.ensureValueRowMargin();
            this.i.jf.top = +v;
            this._a("valueRowMarginTop", this.i.jf.top);
            this.i.jf = this.i.jf;
        }
        ensureValueRowMargin() {
            if (this.i.jf) {
                return;
            }
            this.i.jf = new Thickness(2);
        }
        /**
         * Gets or sets whether to show series rows.
        */
        get valueRowVisible() {
            return this.i.cb;
        }
        set valueRowVisible(v) {
            this.i.cb = ensureBool(v);
            this._a("valueRowVisible", this.i.cb);
        }
        /**
         * Gets or sets text displayed when data column is missing a value, e.g. "no data"
        */
        get valueTextWhenMissingData() {
            return this.i.fp;
        }
        set valueTextWhenMissingData(v) {
            this.i.fp = v;
        }
        /**
         * Gets or sets whether to use series colors when displaying values in the legend
        */
        get valueTextUseSeriesColors() {
            return this.i.cc;
        }
        set valueTextUseSeriesColors(v) {
            this.i.cc = ensureBool(v);
            this._a("valueTextUseSeriesColors", this.i.cc);
        }
        get valueTextMarginBottom() {
            return this.i.jg ? this.i.jg.bottom : NaN;
        }
        set valueTextMarginBottom(v) {
            this.ensureValueTextMargin();
            this.i.jg.bottom = +v;
            this._a("valueTextMarginBottom", this.i.jg.bottom);
            this.i.jg = this.i.jg;
        }
        get valueTextMarginLeft() {
            return this.i.jg ? this.i.jg.left : NaN;
        }
        set valueTextMarginLeft(v) {
            this.ensureValueTextMargin();
            this.i.jg.left = +v;
            this._a("valueTextMarginLeft", this.i.jg.left);
            this.i.jg = this.i.jg;
        }
        get valueTextMarginRight() {
            return this.i.jg ? this.i.jg.right : NaN;
        }
        set valueTextMarginRight(v) {
            this.ensureValueTextMargin();
            this.i.jg.right = +v;
            this._a("valueTextMarginRight", this.i.jg.right);
            this.i.jg = this.i.jg;
        }
        get valueTextMarginTop() {
            return this.i.jg ? this.i.jg.top : NaN;
        }
        set valueTextMarginTop(v) {
            this.ensureValueTextMargin();
            this.i.jg.top = +v;
            this._a("valueTextMarginTop", this.i.jg.top);
            this.i.jg = this.i.jg;
        }
        ensureValueTextMargin() {
            if (this.i.jg) {
                return;
            }
            this.i.jg = new Thickness(2);
        }
        /**
         * Gets or sets the units text color.
        */
        get valueTextColor() {
            return brushToString(this.i.ix);
        }
        set valueTextColor(v) {
            this.i.ix = stringToBrush(v);
            this._a("valueTextColor", brushToString(this.i.ix));
        }
        /**
         * Gets or Sets the style to use for the units text.
        */
        get valueTextStyle() {
            if (this.i.bx == null) {
                return null;
            }
            return this.i.bx.fontString;
        }
        set valueTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bx = fi;
            this._a("valueTextStyle", this.i.bx != null ? this.i.bx.fontString : "");
        }
        /**
         * Gets or sets the format string for header text displayed in the data legend.
        */
        get headerFormatString() {
            return this.i.dm;
        }
        set headerFormatString(v) {
            this.i.dm = v;
        }
        /**
         * Gets or sets the format specifiers to use with the HeaderFormatString string.
        */
        get headerFormatSpecifiers() {
            return this.i.ag;
        }
        set headerFormatSpecifiers(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ag = v;
        }
        /**
         * Gets or sets globalization culture applied to header only when it displays dates that are fetched from date/time axes
         * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
        */
        get headerFormatCulture() {
            return this.i.di;
        }
        set headerFormatCulture(v) {
            this.i.di = v;
        }
        /**
         * Gets or sets date format for the header only when it displays dates that are fetched from date/time axes
         * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
        */
        get headerFormatDate() {
            return this.i.ap;
        }
        set headerFormatDate(v) {
            this.i.ap = ensureEnum(DataLegendHeaderDateMode_$type, v);
            this._a("headerFormatDate", enumToString(DataLegendHeaderDateMode_$type, this.i.ap));
        }
        /**
         * Gets or sets time format for the header only when it displays dates that are fetched from date/time axes
         * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
        */
        get headerFormatTime() {
            return this.i.aq;
        }
        set headerFormatTime(v) {
            this.i.aq = ensureEnum(DataLegendHeaderTimeMode_$type, v);
            this._a("headerFormatTime", enumToString(DataLegendHeaderTimeMode_$type, this.i.aq));
        }
        /**
         * Gets or sets the HeaderText for the data legend.
        */
        get headerText() {
            return this.i.ds;
        }
        set headerText(v) {
            this.i.ds = v;
        }
        /**
         * Gets or sets the header text color.
        */
        get headerTextColor() {
            return brushToString(this.i.io);
        }
        set headerTextColor(v) {
            this.i.io = stringToBrush(v);
            this._a("headerTextColor", brushToString(this.i.io));
        }
        get headerTextMarginBottom() {
            return this.i.i8 ? this.i.i8.bottom : NaN;
        }
        set headerTextMarginBottom(v) {
            this.ensureHeaderTextMargin();
            this.i.i8.bottom = +v;
            this._a("headerTextMarginBottom", this.i.i8.bottom);
            this.i.i8 = this.i.i8;
        }
        get headerTextMarginLeft() {
            return this.i.i8 ? this.i.i8.left : NaN;
        }
        set headerTextMarginLeft(v) {
            this.ensureHeaderTextMargin();
            this.i.i8.left = +v;
            this._a("headerTextMarginLeft", this.i.i8.left);
            this.i.i8 = this.i.i8;
        }
        get headerTextMarginRight() {
            return this.i.i8 ? this.i.i8.right : NaN;
        }
        set headerTextMarginRight(v) {
            this.ensureHeaderTextMargin();
            this.i.i8.right = +v;
            this._a("headerTextMarginRight", this.i.i8.right);
            this.i.i8 = this.i.i8;
        }
        get headerTextMarginTop() {
            return this.i.i8 ? this.i.i8.top : NaN;
        }
        set headerTextMarginTop(v) {
            this.ensureHeaderTextMargin();
            this.i.i8.top = +v;
            this._a("headerTextMarginTop", this.i.i8.top);
            this.i.i8 = this.i.i8;
        }
        ensureHeaderTextMargin() {
            if (this.i.i8) {
                return;
            }
            this.i.i8 = new Thickness(2);
        }
        get headerRowMarginBottom() {
            return this.i.i7 ? this.i.i7.bottom : NaN;
        }
        set headerRowMarginBottom(v) {
            this.ensureHeaderRowMargin();
            this.i.i7.bottom = +v;
            this._a("headerRowMarginBottom", this.i.i7.bottom);
            this.i.i7 = this.i.i7;
        }
        get headerRowMarginLeft() {
            return this.i.i7 ? this.i.i7.left : NaN;
        }
        set headerRowMarginLeft(v) {
            this.ensureHeaderRowMargin();
            this.i.i7.left = +v;
            this._a("headerRowMarginLeft", this.i.i7.left);
            this.i.i7 = this.i.i7;
        }
        get headerRowMarginRight() {
            return this.i.i7 ? this.i.i7.right : NaN;
        }
        set headerRowMarginRight(v) {
            this.ensureHeaderRowMargin();
            this.i.i7.right = +v;
            this._a("headerRowMarginRight", this.i.i7.right);
            this.i.i7 = this.i.i7;
        }
        get headerRowMarginTop() {
            return this.i.i7 ? this.i.i7.top : NaN;
        }
        set headerRowMarginTop(v) {
            this.ensureHeaderRowMargin();
            this.i.i7.top = +v;
            this._a("headerRowMarginTop", this.i.i7.top);
            this.i.i7 = this.i.i7;
        }
        ensureHeaderRowMargin() {
            if (this.i.i7) {
                return;
            }
            this.i.i7 = new Thickness(2);
        }
        /**
         * Gets or sets whether to show Header row.
        */
        get headerRowVisible() {
            return this.i.b5;
        }
        set headerRowVisible(v) {
            this.i.b5 = ensureBool(v);
            this._a("headerRowVisible", this.i.b5);
        }
        /**
         * Gets or Sets the style to use for the header text.
        */
        get headerTextStyle() {
            if (this.i.bp == null) {
                return null;
            }
            return this.i.bp.fontString;
        }
        set headerTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bp = fi;
            this._a("headerTextStyle", this.i.bp != null ? this.i.bp.fontString : "");
        }
        /**
         * Gets or sets whether to show Header row.
        */
        get groupRowVisible() {
            return this.i.b3;
        }
        set groupRowVisible(v) {
            this.i.b3 = ensureBool(v);
            this._a("groupRowVisible", this.i.b3);
        }
        /**
         * Gets or sets the Group text color.
        */
        get groupTextColor() {
            return brushToString(this.i.im);
        }
        set groupTextColor(v) {
            this.i.im = stringToBrush(v);
            this._a("groupTextColor", brushToString(this.i.im));
        }
        get groupTextMarginBottom() {
            return this.i.i6 ? this.i.i6.bottom : NaN;
        }
        set groupTextMarginBottom(v) {
            this.ensureGroupTextMargin();
            this.i.i6.bottom = +v;
            this._a("groupTextMarginBottom", this.i.i6.bottom);
            this.i.i6 = this.i.i6;
        }
        get groupTextMarginLeft() {
            return this.i.i6 ? this.i.i6.left : NaN;
        }
        set groupTextMarginLeft(v) {
            this.ensureGroupTextMargin();
            this.i.i6.left = +v;
            this._a("groupTextMarginLeft", this.i.i6.left);
            this.i.i6 = this.i.i6;
        }
        get groupTextMarginRight() {
            return this.i.i6 ? this.i.i6.right : NaN;
        }
        set groupTextMarginRight(v) {
            this.ensureGroupTextMargin();
            this.i.i6.right = +v;
            this._a("groupTextMarginRight", this.i.i6.right);
            this.i.i6 = this.i.i6;
        }
        get groupTextMarginTop() {
            return this.i.i6 ? this.i.i6.top : NaN;
        }
        set groupTextMarginTop(v) {
            this.ensureGroupTextMargin();
            this.i.i6.top = +v;
            this._a("groupTextMarginTop", this.i.i6.top);
            this.i.i6 = this.i.i6;
        }
        ensureGroupTextMargin() {
            if (this.i.i6) {
                return;
            }
            this.i.i6 = new Thickness(2);
        }
        get groupRowMarginBottom() {
            return this.i.i5 ? this.i.i5.bottom : NaN;
        }
        set groupRowMarginBottom(v) {
            this.ensureGroupRowMargin();
            this.i.i5.bottom = +v;
            this._a("groupRowMarginBottom", this.i.i5.bottom);
            this.i.i5 = this.i.i5;
        }
        get groupRowMarginLeft() {
            return this.i.i5 ? this.i.i5.left : NaN;
        }
        set groupRowMarginLeft(v) {
            this.ensureGroupRowMargin();
            this.i.i5.left = +v;
            this._a("groupRowMarginLeft", this.i.i5.left);
            this.i.i5 = this.i.i5;
        }
        get groupRowMarginRight() {
            return this.i.i5 ? this.i.i5.right : NaN;
        }
        set groupRowMarginRight(v) {
            this.ensureGroupRowMargin();
            this.i.i5.right = +v;
            this._a("groupRowMarginRight", this.i.i5.right);
            this.i.i5 = this.i.i5;
        }
        get groupRowMarginTop() {
            return this.i.i5 ? this.i.i5.top : NaN;
        }
        set groupRowMarginTop(v) {
            this.ensureGroupRowMargin();
            this.i.i5.top = +v;
            this._a("groupRowMarginTop", this.i.i5.top);
            this.i.i5 = this.i.i5;
        }
        ensureGroupRowMargin() {
            if (this.i.i5) {
                return;
            }
            this.i.i5 = new Thickness(2);
        }
        /**
         * Gets or Sets the style to use for the Group text.
        */
        get groupTextStyle() {
            if (this.i.bo == null) {
                return null;
            }
            return this.i.bo.fontString;
        }
        set groupTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bo = fi;
            this._a("groupTextStyle", this.i.bo != null ? this.i.bo.fontString : "");
        }
        /**
         * Gets or sets the summary text color.
        */
        get summaryTitleTextColor() {
            return brushToString(this.i.is);
        }
        set summaryTitleTextColor(v) {
            this.i.is = stringToBrush(v);
            this._a("summaryTitleTextColor", brushToString(this.i.is));
        }
        /**
         * Gets or Sets the style to use for the summary text.
        */
        get summaryTitleTextStyle() {
            if (this.i.bs == null) {
                return null;
            }
            return this.i.bs.fontString;
        }
        set summaryTitleTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bs = fi;
            this._a("summaryTitleTextStyle", this.i.bs != null ? this.i.bs.fontString : "");
        }
        /**
         * Gets or sets the SummaryType for the data legend.
        */
        get summaryType() {
            return this.i.a3;
        }
        set summaryType(v) {
            this.i.a3 = ensureEnum(DataLegendSummaryType_$type, v);
            this._a("summaryType", enumToString(DataLegendSummaryType_$type, this.i.a3));
        }
        /**
         * Gets or sets the SummaryTitleText for the data legend.
        */
        get summaryTitleText() {
            return this.i.ej;
        }
        set summaryTitleText(v) {
            this.i.ej = v;
        }
        get summaryTitleTextMarginBottom() {
            return this.i.jb ? this.i.jb.bottom : NaN;
        }
        set summaryTitleTextMarginBottom(v) {
            this.ensureSummaryTitleTextMargin();
            this.i.jb.bottom = +v;
            this._a("summaryTitleTextMarginBottom", this.i.jb.bottom);
            this.i.jb = this.i.jb;
        }
        get summaryTitleTextMarginLeft() {
            return this.i.jb ? this.i.jb.left : NaN;
        }
        set summaryTitleTextMarginLeft(v) {
            this.ensureSummaryTitleTextMargin();
            this.i.jb.left = +v;
            this._a("summaryTitleTextMarginLeft", this.i.jb.left);
            this.i.jb = this.i.jb;
        }
        get summaryTitleTextMarginRight() {
            return this.i.jb ? this.i.jb.right : NaN;
        }
        set summaryTitleTextMarginRight(v) {
            this.ensureSummaryTitleTextMargin();
            this.i.jb.right = +v;
            this._a("summaryTitleTextMarginRight", this.i.jb.right);
            this.i.jb = this.i.jb;
        }
        get summaryTitleTextMarginTop() {
            return this.i.jb ? this.i.jb.top : NaN;
        }
        set summaryTitleTextMarginTop(v) {
            this.ensureSummaryTitleTextMargin();
            this.i.jb.top = +v;
            this._a("summaryTitleTextMarginTop", this.i.jb.top);
            this.i.jb = this.i.jb;
        }
        ensureSummaryTitleTextMargin() {
            if (this.i.jb) {
                return;
            }
            this.i.jb = new Thickness(2);
        }
        get summaryRowMarginBottom() {
            return this.i.ja ? this.i.ja.bottom : NaN;
        }
        set summaryRowMarginBottom(v) {
            this.ensureSummaryRowMargin();
            this.i.ja.bottom = +v;
            this._a("summaryRowMarginBottom", this.i.ja.bottom);
            this.i.ja = this.i.ja;
        }
        get summaryRowMarginLeft() {
            return this.i.ja ? this.i.ja.left : NaN;
        }
        set summaryRowMarginLeft(v) {
            this.ensureSummaryRowMargin();
            this.i.ja.left = +v;
            this._a("summaryRowMarginLeft", this.i.ja.left);
            this.i.ja = this.i.ja;
        }
        get summaryRowMarginRight() {
            return this.i.ja ? this.i.ja.right : NaN;
        }
        set summaryRowMarginRight(v) {
            this.ensureSummaryRowMargin();
            this.i.ja.right = +v;
            this._a("summaryRowMarginRight", this.i.ja.right);
            this.i.ja = this.i.ja;
        }
        get summaryRowMarginTop() {
            return this.i.ja ? this.i.ja.top : NaN;
        }
        set summaryRowMarginTop(v) {
            this.ensureSummaryRowMargin();
            this.i.ja.top = +v;
            this._a("summaryRowMarginTop", this.i.ja.top);
            this.i.ja = this.i.ja;
        }
        ensureSummaryRowMargin() {
            if (this.i.ja) {
                return;
            }
            this.i.ja = new Thickness(2);
        }
        /**
         * Gets or sets the units text color.
        */
        get summaryValueTextColor() {
            return brushToString(this.i.iu);
        }
        set summaryValueTextColor(v) {
            this.i.iu = stringToBrush(v);
            this._a("summaryValueTextColor", brushToString(this.i.iu));
        }
        /**
         * Gets or Sets the style to use for the units text.
        */
        get summaryValueTextStyle() {
            if (this.i.bu == null) {
                return null;
            }
            return this.i.bu.fontString;
        }
        set summaryValueTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bu = fi;
            this._a("summaryValueTextStyle", this.i.bu != null ? this.i.bu.fontString : "");
        }
        /**
         * Gets or sets the units text for the data legend.
        */
        get summaryLabelText() {
            return this.i.ee;
        }
        set summaryLabelText(v) {
            this.i.ee = v;
        }
        /**
         * Gets or sets the units text color.
        */
        get summaryLabelTextColor() {
            return brushToString(this.i.ir);
        }
        set summaryLabelTextColor(v) {
            this.i.ir = stringToBrush(v);
            this._a("summaryLabelTextColor", brushToString(this.i.ir));
        }
        /**
         * Gets or Sets the style to use for the units text.
        */
        get summaryLabelTextStyle() {
            if (this.i.br == null) {
                return null;
            }
            return this.i.br.fontString;
        }
        set summaryLabelTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.br = fi;
            this._a("summaryLabelTextStyle", this.i.br != null ? this.i.br.fontString : "");
        }
        /**
         * Gets or sets the units text for the data legend.
        */
        get summaryUnitsText() {
            return this.i.ep;
        }
        set summaryUnitsText(v) {
            this.i.ep = v;
        }
        /**
         * Gets or sets the units text color.
        */
        get summaryUnitsTextColor() {
            return brushToString(this.i.it);
        }
        set summaryUnitsTextColor(v) {
            this.i.it = stringToBrush(v);
            this._a("summaryUnitsTextColor", brushToString(this.i.it));
        }
        /**
         * Gets or Sets the style to use for the units text.
        */
        get summaryUnitsTextStyle() {
            if (this.i.bt == null) {
                return null;
            }
            return this.i.bt.fontString;
        }
        set summaryUnitsTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bt = fi;
            this._a("summaryUnitsTextStyle", this.i.bt != null ? this.i.bt.fontString : "");
        }
        get badgeMarginBottom() {
            return this.i.i4 ? this.i.i4.bottom : NaN;
        }
        set badgeMarginBottom(v) {
            this.ensureBadgeMargin();
            this.i.i4.bottom = +v;
            this._a("badgeMarginBottom", this.i.i4.bottom);
            this.i.i4 = this.i.i4;
        }
        get badgeMarginLeft() {
            return this.i.i4 ? this.i.i4.left : NaN;
        }
        set badgeMarginLeft(v) {
            this.ensureBadgeMargin();
            this.i.i4.left = +v;
            this._a("badgeMarginLeft", this.i.i4.left);
            this.i.i4 = this.i.i4;
        }
        get badgeMarginRight() {
            return this.i.i4 ? this.i.i4.right : NaN;
        }
        set badgeMarginRight(v) {
            this.ensureBadgeMargin();
            this.i.i4.right = +v;
            this._a("badgeMarginRight", this.i.i4.right);
            this.i.i4 = this.i.i4;
        }
        get badgeMarginTop() {
            return this.i.i4 ? this.i.i4.top : NaN;
        }
        set badgeMarginTop(v) {
            this.ensureBadgeMargin();
            this.i.i4.top = +v;
            this._a("badgeMarginTop", this.i.i4.top);
            this.i.i4 = this.i.i4;
        }
        ensureBadgeMargin() {
            if (this.i.i4) {
                return;
            }
            this.i.i4 = new Thickness(2);
        }
        /**
         * Gets or sets the BadgeShape for the data legend.
        */
        get badgeShape() {
            return this.i.ba;
        }
        set badgeShape(v) {
            this.i.ba = ensureEnum(LegendItemBadgeShape_$type, v);
            this._a("badgeShape", enumToString(LegendItemBadgeShape_$type, this.i.ba));
        }
        /**
         * Gets or sets horizontal position (between 0.0 and 1.0) in viewport of the target component
        */
        get targetCursorPositionX() {
            return this.i.targetCursorPositionX;
        }
        set targetCursorPositionX(v) {
            this.i.targetCursorPositionX = +v;
            this._a("targetCursorPositionX", this.i.targetCursorPositionX);
        }
        /**
         * Gets or sets vertical position (between 0.0 and 1.0) in viewport of the target component
        */
        get targetCursorPositionY() {
            return this.i.targetCursorPositionY;
        }
        set targetCursorPositionY(v) {
            this.i.targetCursorPositionY = +v;
            this._a("targetCursorPositionY", this.i.targetCursorPositionY);
        }
        /**
         * Gets or sets the UnitsMode for the data legend.
        */
        get unitsDisplayMode() {
            return this.i.a4;
        }
        set unitsDisplayMode(v) {
            this.i.a4 = ensureEnum(DataLegendUnitsMode_$type, v);
            this._a("unitsDisplayMode", enumToString(DataLegendUnitsMode_$type, this.i.a4));
        }
        /**
         * Gets or sets the units text for the data legend.
        */
        get unitsText() {
            return this.i.e2;
        }
        set unitsText(v) {
            this.i.e2 = v;
        }
        /**
         * Gets or sets the units text color.
        */
        get unitsTextColor() {
            return brushToString(this.i.iw);
        }
        set unitsTextColor(v) {
            this.i.iw = stringToBrush(v);
            this._a("unitsTextColor", brushToString(this.i.iw));
        }
        get unitsTextMarginBottom() {
            return this.i.jd ? this.i.jd.bottom : NaN;
        }
        set unitsTextMarginBottom(v) {
            this.ensureUnitsTextMargin();
            this.i.jd.bottom = +v;
            this._a("unitsTextMarginBottom", this.i.jd.bottom);
            this.i.jd = this.i.jd;
        }
        get unitsTextMarginLeft() {
            return this.i.jd ? this.i.jd.left : NaN;
        }
        set unitsTextMarginLeft(v) {
            this.ensureUnitsTextMargin();
            this.i.jd.left = +v;
            this._a("unitsTextMarginLeft", this.i.jd.left);
            this.i.jd = this.i.jd;
        }
        get unitsTextMarginRight() {
            return this.i.jd ? this.i.jd.right : NaN;
        }
        set unitsTextMarginRight(v) {
            this.ensureUnitsTextMargin();
            this.i.jd.right = +v;
            this._a("unitsTextMarginRight", this.i.jd.right);
            this.i.jd = this.i.jd;
        }
        get unitsTextMarginTop() {
            return this.i.jd ? this.i.jd.top : NaN;
        }
        set unitsTextMarginTop(v) {
            this.ensureUnitsTextMargin();
            this.i.jd.top = +v;
            this._a("unitsTextMarginTop", this.i.jd.top);
            this.i.jd = this.i.jd;
        }
        ensureUnitsTextMargin() {
            if (this.i.jd) {
                return;
            }
            this.i.jd = new Thickness(2);
        }
        /**
         * Gets or Sets the style to use for the units text.
        */
        get unitsTextStyle() {
            if (this.i.bw == null) {
                return null;
            }
            return this.i.bw.fontString;
        }
        set unitsTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bw = fi;
            this._a("unitsTextStyle", this.i.bw != null ? this.i.bw.fontString : "");
        }
        get titleTextMarginBottom() {
            return this.i.jc ? this.i.jc.bottom : NaN;
        }
        set titleTextMarginBottom(v) {
            this.ensureTitleTextMargin();
            this.i.jc.bottom = +v;
            this._a("titleTextMarginBottom", this.i.jc.bottom);
            this.i.jc = this.i.jc;
        }
        get titleTextMarginLeft() {
            return this.i.jc ? this.i.jc.left : NaN;
        }
        set titleTextMarginLeft(v) {
            this.ensureTitleTextMargin();
            this.i.jc.left = +v;
            this._a("titleTextMarginLeft", this.i.jc.left);
            this.i.jc = this.i.jc;
        }
        get titleTextMarginRight() {
            return this.i.jc ? this.i.jc.right : NaN;
        }
        set titleTextMarginRight(v) {
            this.ensureTitleTextMargin();
            this.i.jc.right = +v;
            this._a("titleTextMarginRight", this.i.jc.right);
            this.i.jc = this.i.jc;
        }
        get titleTextMarginTop() {
            return this.i.jc ? this.i.jc.top : NaN;
        }
        set titleTextMarginTop(v) {
            this.ensureTitleTextMargin();
            this.i.jc.top = +v;
            this._a("titleTextMarginTop", this.i.jc.top);
            this.i.jc = this.i.jc;
        }
        ensureTitleTextMargin() {
            if (this.i.jc) {
                return;
            }
            this.i.jc = new Thickness(2);
        }
        /**
         * Gets or sets the display text color.
        */
        get titleTextColor() {
            return brushToString(this.i.iv);
        }
        set titleTextColor(v) {
            this.i.iv = stringToBrush(v);
            this._a("titleTextColor", brushToString(this.i.iv));
        }
        /**
         * Gets or Sets the style to use for the display text.
        */
        get titleTextStyle() {
            if (this.i.bv == null) {
                return null;
            }
            return this.i.bv.fontString;
        }
        set titleTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bv = fi;
            this._a("titleTextStyle", this.i.bv != null ? this.i.bv.fontString : "");
        }
        /**
         * Gets or sets the mode for displaying labels before series values in the data legend, e.g. O: H: L: C: for financial series
        */
        get labelDisplayMode() {
            return this.i.ar;
        }
        set labelDisplayMode(v) {
            this.i.ar = ensureEnum(DataLegendLabelMode_$type, v);
            this._a("labelDisplayMode", enumToString(DataLegendLabelMode_$type, this.i.ar));
        }
        /**
         * Gets or sets the units text color.
        */
        get labelTextColor() {
            return brushToString(this.i.ip);
        }
        set labelTextColor(v) {
            this.i.ip = stringToBrush(v);
            this._a("labelTextColor", brushToString(this.i.ip));
        }
        get labelTextMarginBottom() {
            return this.i.i9 ? this.i.i9.bottom : NaN;
        }
        set labelTextMarginBottom(v) {
            this.ensureLabelTextMargin();
            this.i.i9.bottom = +v;
            this._a("labelTextMarginBottom", this.i.i9.bottom);
            this.i.i9 = this.i.i9;
        }
        get labelTextMarginLeft() {
            return this.i.i9 ? this.i.i9.left : NaN;
        }
        set labelTextMarginLeft(v) {
            this.ensureLabelTextMargin();
            this.i.i9.left = +v;
            this._a("labelTextMarginLeft", this.i.i9.left);
            this.i.i9 = this.i.i9;
        }
        get labelTextMarginRight() {
            return this.i.i9 ? this.i.i9.right : NaN;
        }
        set labelTextMarginRight(v) {
            this.ensureLabelTextMargin();
            this.i.i9.right = +v;
            this._a("labelTextMarginRight", this.i.i9.right);
            this.i.i9 = this.i.i9;
        }
        get labelTextMarginTop() {
            return this.i.i9 ? this.i.i9.top : NaN;
        }
        set labelTextMarginTop(v) {
            this.ensureLabelTextMargin();
            this.i.i9.top = +v;
            this._a("labelTextMarginTop", this.i.i9.top);
            this.i.i9 = this.i.i9;
        }
        ensureLabelTextMargin() {
            if (this.i.i9) {
                return;
            }
            this.i.i9 = new Thickness(2);
        }
        /**
         * Gets or Sets the style to use for the units text.
        */
        get labelTextStyle() {
            if (this.i.bq == null) {
                return null;
            }
            return this.i.bq.fontString;
        }
        set labelTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.bq = fi;
            this._a("labelTextStyle", this.i.bq != null ? this.i.bq.fontString : "");
        }
        /**
         * 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 pixelScalingRatio() {
            return this.i.pixelScalingRatio;
        }
        set pixelScalingRatio(v) {
            this.i.pixelScalingRatio = +v;
            this._a("pixelScalingRatio", this.i.pixelScalingRatio);
        }
        /**
         * Gets or sets the layout of content in the data legend
        */
        get layoutMode() {
            return this.i.as;
        }
        set layoutMode(v) {
            this.i.as = ensureEnum(DataLegendLayoutMode_$type, v);
            this._a("layoutMode", enumToString(DataLegendLayoutMode_$type, this.i.as));
        }
        findByName(name) {
            if (this.findEphemera) {
                if (name && name.indexOf("@@e:") == 0) {
                    return this.findEphemera(name);
                }
            }
            if (this.valueFormatSpecifiers != null && arrayFindByName(this.valueFormatSpecifiers, name)) {
                return arrayFindByName(this.valueFormatSpecifiers, name);
            }
            if (this.headerFormatSpecifiers != null && arrayFindByName(this.headerFormatSpecifiers, name)) {
                return arrayFindByName(this.headerFormatSpecifiers, name);
            }
            return null;
        }
        get hasUserValues() {
            return this._hasUserValues;
        }
        __m(propertyName) {
            if (!this._inStyling) {
                this._hasUserValues.add(propertyName);
            }
        }
        _styling(container, component, parent) {
            if (this._inStyling) {
                return;
            }
            this._inStyling = true;
            this._stylingContainer = container;
            this._stylingParent = component;
            let genericPrefix = "";
            let typeName = this.i.$type.name;
            if (typeName.indexOf("Xam") === 0) {
                typeName = typeName.substring(3);
            }
            genericPrefix = toSpinal("DataLegendComponent");
            let additionalPrefixes = [];
            let prefix = toSpinal(typeName);
            additionalPrefixes.push(prefix + "-");
            let 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);
                }
                let basePrefix = toSpinal(typeName);
                additionalPrefixes.push(basePrefix + "-");
                b = b.baseType;
            }
            if (parent) {
                let parentTypeName = parent.i.$type.name;
                if (parentTypeName.indexOf("Xam") === 0) {
                    parentTypeName = parentTypeName.substring(3);
                }
                let 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;
        }
        /**
     * Returns the legend visuals expressed as a serialized string.
    
    */
        exportSerializedVisualData() {
            let iv = this.i.exportSerializedVisualData();
            return (iv);
        }
        /**
         * Notifies the legend about changes to size
        
        */
        notifySizeChanged() {
            this.i.notifySizeChanged();
        }
        /**
         * Forces any pending refresh to the legend to be finished.
        
        */
        flush() {
            this.i.flush();
        }
        getAbbreviatedNumber(number, mode, minDigits, maxDigits) {
            let iv = this.i.cv(number, (mode == null ? null : mode), minDigits, maxDigits);
            return (iv);
        }
        getAbbreviatedSymbol(number, mode, minDigits, maxDigits) {
            let iv = this.i.dc(number, (mode == null ? null : mode), minDigits, maxDigits);
            return (iv);
        }
        getAbbreviatedString(number, mode, minDigits, maxDigits) {
            let iv = this.i.db(number, (mode == null ? null : mode), minDigits, maxDigits);
            return (iv);
        }
        /**
         * Event raised when calculating summary value for each column in data legend
        */
        get calculateColumnSummary() {
            return this._calculateColumnSummary;
        }
        set calculateColumnSummary(ev) {
            if (this._calculateColumnSummary_wrapped !== null) {
                this.i.calculateColumnSummary = delegateRemove(this.i.calculateColumnSummary, this._calculateColumnSummary_wrapped);
                this._calculateColumnSummary_wrapped = null;
                this._calculateColumnSummary = null;
            }
            this._calculateColumnSummary = ev;
            this._calculateColumnSummary_wrapped = (o, e) => {
                let outerArgs = new IgcDataLegendSummaryEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeCalculateColumnSummary) {
                    this.beforeCalculateColumnSummary(this, outerArgs);
                }
                if (this._calculateColumnSummary) {
                    this._calculateColumnSummary(this, outerArgs);
                }
            };
            this.i.calculateColumnSummary = delegateCombine(this.i.calculateColumnSummary, this._calculateColumnSummary_wrapped);
            ;
        }
        /**
         * Event raised when styling the header row
        */
        get styleHeaderRow() {
            return this._styleHeaderRow;
        }
        set styleHeaderRow(ev) {
            if (this._styleHeaderRow_wrapped !== null) {
                this.i.styleHeaderRow = delegateRemove(this.i.styleHeaderRow, this._styleHeaderRow_wrapped);
                this._styleHeaderRow_wrapped = null;
                this._styleHeaderRow = null;
            }
            this._styleHeaderRow = ev;
            this._styleHeaderRow_wrapped = (o, e) => {
                let outerArgs = new IgcDataLegendStylingRowEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeStyleHeaderRow) {
                    this.beforeStyleHeaderRow(this, outerArgs);
                }
                if (this._styleHeaderRow) {
                    this._styleHeaderRow(this, outerArgs);
                }
            };
            this.i.styleHeaderRow = delegateCombine(this.i.styleHeaderRow, this._styleHeaderRow_wrapped);
            ;
        }
        /**
         * Event raised when styling the group row
        */
        get styleGroupRow() {
            return this._styleGroupRow;
        }
        set styleGroupRow(ev) {
            if (this._styleGroupRow_wrapped !== null) {
                this.i.styleGroupRow = delegateRemove(this.i.styleGroupRow, this._styleGroupRow_wrapped);
                this._styleGroupRow_wrapped = null;
                this._styleGroupRow = null;
            }
            this._styleGroupRow = ev;
            this._styleGroupRow_wrapped = (o, e) => {
                let outerArgs = new IgcDataLegendStylingRowEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeStyleGroupRow) {
                    this.beforeStyleGroupRow(this, outerArgs);
                }
                if (this._styleGroupRow) {
                    this._styleGroupRow(this, outerArgs);
                }
            };
            this.i.styleGroupRow = delegateCombine(this.i.styleGroupRow, this._styleGroupRow_wrapped);
            ;
        }
        /**
         * Event raised when styling title and badge in series rows
        */
        get styleSeriesRow() {
            return this._styleSeriesRow;
        }
        set styleSeriesRow(ev) {
            if (this._styleSeriesRow_wrapped !== null) {
                this.i.styleSeriesRow = delegateRemove(this.i.styleSeriesRow, this._styleSeriesRow_wrapped);
                this._styleSeriesRow_wrapped = null;
                this._styleSeriesRow = null;
            }
            this._styleSeriesRow = ev;
            this._styleSeriesRow_wrapped = (o, e) => {
                let outerArgs = new IgcDataLegendStylingRowEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeStyleSeriesRow) {
                    this.beforeStyleSeriesRow(this, outerArgs);
                }
                if (this._styleSeriesRow) {
                    this._styleSeriesRow(this, outerArgs);
                }
            };
            this.i.styleSeriesRow = delegateCombine(this.i.styleSeriesRow, this._styleSeriesRow_wrapped);
            ;
        }
        /**
         * Event raised when styling title in the summary row
        */
        get styleSummaryRow() {
            return this._styleSummaryRow;
        }
        set styleSummaryRow(ev) {
            if (this._styleSummaryRow_wrapped !== null) {
                this.i.styleSummaryRow = delegateRemove(this.i.styleSummaryRow, this._styleSummaryRow_wrapped);
                this._styleSummaryRow_wrapped = null;
                this._styleSummaryRow = null;
            }
            this._styleSummaryRow = ev;
            this._styleSummaryRow_wrapped = (o, e) => {
                let outerArgs = new IgcDataLegendStylingRowEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeStyleSummaryRow) {
                    this.beforeStyleSummaryRow(this, outerArgs);
                }
                if (this._styleSummaryRow) {
                    this._styleSummaryRow(this, outerArgs);
                }
            };
            this.i.styleSummaryRow = delegateCombine(this.i.styleSummaryRow, this._styleSummaryRow_wrapped);
            ;
        }
        /**
         * Event raised when styling the label, value, and unit columns in series rows
        */
        get styleSeriesColumn() {
            return this._styleSeriesColumn;
        }
        set styleSeriesColumn(ev) {
            if (this._styleSeriesColumn_wrapped !== null) {
                this.i.styleSeriesColumn = delegateRemove(this.i.styleSeriesColumn, this._styleSeriesColumn_wrapped);
                this._styleSeriesColumn_wrapped = null;
                this._styleSeriesColumn = null;
            }
            this._styleSeriesColumn = ev;
            this._styleSeriesColumn_wrapped = (o, e) => {
                let outerArgs = new IgcDataLegendStylingColumnEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeStyleSeriesColumn) {
                    this.beforeStyleSeriesColumn(this, outerArgs);
                }
                if (this._styleSeriesColumn) {
                    this._styleSeriesColumn(this, outerArgs);
                }
            };
            this.i.styleSeriesColumn = delegateCombine(this.i.styleSeriesColumn, this._styleSeriesColumn_wrapped);
            ;
        }
        /**
         * Event raised when styling the label, value, and unit columns in summary row
        */
        get styleSummaryColumn() {
            return this._styleSummaryColumn;
        }
        set styleSummaryColumn(ev) {
            if (this._styleSummaryColumn_wrapped !== null) {
                this.i.styleSummaryColumn = delegateRemove(this.i.styleSummaryColumn, this._styleSummaryColumn_wrapped);
                this._styleSummaryColumn_wrapped = null;
                this._styleSummaryColumn = null;
            }
            this._styleSummaryColumn = ev;
            this._styleSummaryColumn_wrapped = (o, e) => {
                let outerArgs = new IgcDataLegendStylingColumnEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeStyleSummaryColumn) {
                    this.beforeStyleSummaryColumn(this, outerArgs);
                }
                if (this._styleSummaryColumn) {
                    this._styleSummaryColumn(this, outerArgs);
                }
            };
            this.i.styleSummaryColumn = delegateCombine(this.i.styleSummaryColumn, this._styleSummaryColumn_wrapped);
            ;
        }
    }
    IgcDataLegendComponent._observedAttributesIgcDataLegendComponent = null;
    IgcDataLegendComponent.htmlTagName = "igc-data-legend";
    IgcDataLegendComponent._isElementRegistered = false;
    return IgcDataLegendComponent;
})();