UNPKG

igniteui-webcomponents-charts

Version:

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

1,368 lines (1,358 loc) 56.1 kB
import { __extends } from "tslib"; import { IgcHTMLElement } from "igniteui-webcomponents-core"; import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { LabelsPosition_$type } from "./LabelsPosition"; import { Visibility_$type } from "igniteui-webcomponents-core"; import { LeaderLineType_$type } from "./LeaderLineType"; import { OthersCategoryType_$type } from "igniteui-webcomponents-core"; import { IgcIndexCollection } from "./igc-index-collection"; import { SweepDirection_$type } from "igniteui-webcomponents-core"; import { LegendEmptyValuesMode_$type } from "igniteui-webcomponents-core"; import { SliceSelectionMode_$type } from "./SliceSelectionMode"; import { IgcObjectCollection } from "igniteui-webcomponents-core"; import { IgcLabelClickEventArgs } from "./igc-label-click-event-args"; import { IgcSelectedItemChangingEventArgs } from "./igc-selected-item-changing-event-args"; import { IgcSelectedItemsChangingEventArgs } from "./igc-selected-items-changing-event-args"; import { IgcSelectedItemChangedEventArgs } from "./igc-selected-item-changed-event-args"; import { IgcSelectedItemsChangedEventArgs } from "./igc-selected-items-changed-event-args"; import { IgcSliceClickEventArgs } from "./igc-slice-click-event-args"; import { IgcSliceEventArgs } from "./igc-slice-event-args"; import { TypeRegistrar, Number_$type, Base } from "igniteui-webcomponents-core"; import { NamePatcher, getAllPropertyNames, fromSpinal, toSpinal, ensureEnum, enumToString, brushToString, stringToBrush, ensureBool, toBrushCollection, fromBrushCollection, brushCollectionToString, arrayFindByName, initializePropertiesFromCss, toPoint } from "igniteui-webcomponents-core"; import { IndexCollection as IndexCollection_internal } from "./IndexCollection"; import { SyncableObservableCollection$1 } from "igniteui-webcomponents-core"; import { Style } from "igniteui-webcomponents-core"; import { ObjectCollection as ObjectCollection_internal } from "igniteui-webcomponents-core"; /** * Represents the base class for the pie chart. */ var IgcPieChartBaseComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcPieChartBaseComponent, _super); function IgcPieChartBaseComponent() { var _this = _super.call(this) || this; _this._settingAttributes = false; _this._attached = false; _this._queuedSetAttributes = []; _this._updatingFromAttribute = false; _this._explodedSlices = null; _this._selectedItems = null; _this.__p = null; _this._hasUserValues = new Set(); _this._stylingContainer = null; _this._stylingParent = null; _this._inStyling = false; _this._labelClick = null; _this._labelClick_wrapped = null; _this._selectedItemChanging = null; _this._selectedItemChanging_wrapped = null; _this._selectedItemsChanging = null; _this._selectedItemsChanging_wrapped = null; _this._selectedItemChanged = null; _this._selectedItemChanged_wrapped = null; _this._selectedItemsChanged = null; _this._selectedItemsChanged_wrapped = null; _this._sliceClick = null; _this._sliceClick_wrapped = null; _this._sliceEnter = null; _this._sliceEnter_wrapped = null; _this._sliceLeave = null; _this._sliceLeave_wrapped = null; _this._sliceHover = null; _this._sliceHover_wrapped = null; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this._implementation = _this.createImplementation(); _this._implementation.externalObject = _this; _this.onImplementationCreated(); if (_this._initializeAdapters) { _this._initializeAdapters(); } return _this; } IgcPieChartBaseComponent.prototype.createImplementation = function () { return null; }; Object.defineProperty(IgcPieChartBaseComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; } /** * @hidden */, enumerable: false, configurable: true }); IgcPieChartBaseComponent._createFromInternal = function (internal) { if (!internal) { return null; } if (!internal.$type) { return null; } var name = internal.$type.name; var externalName = "Igc" + name + "Component"; if (!TypeRegistrar.isRegistered(externalName)) { return null; } return TypeRegistrar.create(externalName); }; IgcPieChartBaseComponent.prototype.onImplementationCreated = function () { }; IgcPieChartBaseComponent.prototype._enqueueSetAttribute = function (attrName, attrValue) { this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue }); }; IgcPieChartBaseComponent.prototype._flushQueuedAttributes = function () { this._settingAttributes = true; for (var i = 0; i < this._queuedSetAttributes.length; i++) { this.setAttribute(this._queuedSetAttributes[i].attrName, this._queuedSetAttributes[i].attrValue); } this._settingAttributes = false; this._queuedSetAttributes.length = 0; }; IgcPieChartBaseComponent.prototype._a = function (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; }; IgcPieChartBaseComponent.prototype.connectedCallback = function () { if (_super.prototype["connectedCallback"]) { _super.prototype["connectedCallback"].call(this); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } }; IgcPieChartBaseComponent.prototype.disconnectedCallback = function () { if (_super.prototype["disconnectedCallback"]) { _super.prototype["disconnectedCallback"].call(this); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } }; Object.defineProperty(IgcPieChartBaseComponent, "observedAttributes", { get: function () { if (IgcPieChartBaseComponent._observedAttributesIgcPieChartBaseComponent == null) { var names = getAllPropertyNames(IgcPieChartBaseComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcPieChartBaseComponent._observedAttributesIgcPieChartBaseComponent = names; } return IgcPieChartBaseComponent._observedAttributesIgcPieChartBaseComponent; }, enumerable: false, configurable: true }); IgcPieChartBaseComponent.prototype.attributeChangedCallback = function (name, oldValue, newValue) { if (this._settingAttributes) { return; } var setName = fromSpinal(name); this._updatingFromAttribute = true; this[setName] = newValue; this._updatingFromAttribute = false; }; Object.defineProperty(IgcPieChartBaseComponent.prototype, "innerExtent", { /** * Gets or sets the amount of space between the center and the start of the arc. This property should be set between 0 and 1. * If InnerExtent is set to a value greater than 1, it will be interpreted as a percentage, effectively divided by 100. */ get: function () { return this.i.da; }, set: function (v) { this.i.da = +v; this._a("innerExtent", this.i.da); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "valueMemberPath", { /** * Gets or Sets the property name that contains the values. */ get: function () { return this.i.fv; }, set: function (v) { this.i.fv = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelMemberPath", { /** * Gets or sets the property name that contains the labels. */ get: function () { return this.i.ej; }, set: function (v) { this.i.ej = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendLabelMemberPath", { /** * Gets or sets the property name that contains the legend labels. */ get: function () { return this.i.ez; }, set: function (v) { this.i.ez = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelsPosition", { /** * Gets or sets the position of chart labels. */ get: function () { return this.i.az; }, set: function (v) { this.i.az = ensureEnum(LabelsPosition_$type, v); this._a("labelsPosition", enumToString(LabelsPosition_$type, this.i.az)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelOuterColor", { /** * Gets or sets the color for labels rendered outside of the pie chart. */ get: function () { return brushToString(this.i.i1); }, set: function (v) { this.i.i1 = stringToBrush(v); this._a("labelOuterColor", brushToString(this.i.i1)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelInnerColor", { /** * Gets or sets the color for labels rendered inside of the pie chart. */ get: function () { return brushToString(this.i.i0); }, set: function (v) { this.i.i0 = stringToBrush(v); this._a("labelInnerColor", brushToString(this.i.i0)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "actualLabelOuterColor", { /** * Gets the actual color for labels rendered outside of the pie chart. */ get: function () { return brushToString(this.i.iz); }, set: function (v) { this.i.iz = stringToBrush(v); this._a("actualLabelOuterColor", brushToString(this.i.iz)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "actualLabelInnerColor", { /** * Gets the actual color for labels rendered inside of the pie chart. */ get: function () { return brushToString(this.i.iy); }, set: function (v) { this.i.iy = stringToBrush(v); this._a("actualLabelInnerColor", brushToString(this.i.iy)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "leaderLineVisibility", { /** * Gets or sets whether the leader lines are visible. */ get: function () { return this.i.je; }, set: function (v) { this.i.je = ensureEnum(Visibility_$type, v); this._a("leaderLineVisibility", enumToString(Visibility_$type, this.i.je)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "leaderLineType", { /** * Gets or sets what type of leader lines will be used for the outside end labels. */ get: function () { return this.i.a0; }, set: function (v) { this.i.a0 = ensureEnum(LeaderLineType_$type, v); this._a("leaderLineType", enumToString(LeaderLineType_$type, this.i.a0)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "leaderLineMargin", { /** * Gets or sets the margin between a label and the end of its leader line. The default is 6 pixels. */ get: function () { return this.i.dc; }, set: function (v) { this.i.dc = +v; this._a("leaderLineMargin", this.i.dc); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "toolTip", { /** * Gets or sets the ToolTip for the chart. */ get: function () { return this.i.dr; }, set: function (v) { this.i.dr = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersCategoryThreshold", { /** * Gets or sets the threshold value that determines if slices are grouped into the Others slice. */ get: function () { return this.i.dd; }, set: function (v) { this.i.dd = +v; this._a("othersCategoryThreshold", this.i.dd); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersCategoryType", { /** * Gets or sets whether to use numeric or percent-based threshold value. */ get: function () { return this.i.a2; }, set: function (v) { this.i.a2 = ensureEnum(OthersCategoryType_$type, v); this._a("othersCategoryType", enumToString(OthersCategoryType_$type, this.i.a2)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersCategoryText", { /** * Gets or sets the label of the Others slice. */ get: function () { return this.i.e6; }, set: function (v) { this.i.e6 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "explodedRadius", { /** * Determines how much the exploded slice is offset from the center. Value between 0 and 1. */ get: function () { return this.i.c5; }, set: function (v) { this.i.c5 = +v; this._a("explodedRadius", this.i.c5); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "radiusFactor", { /** * Gets or sets the scaling factor of the chart's radius. Value between 0 and 1. */ get: function () { return this.i.dg; }, set: function (v) { this.i.dg = +v; this._a("radiusFactor", this.i.dg); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "allowSliceSelection", { /** * Gets or sets whether the slices can be selected. */ get: function () { return this.i.b9; }, set: function (v) { this.i.b9 = ensureBool(v); this._a("allowSliceSelection", this.i.b9); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "allowSliceExplosion", { /** * Gets or sets whether the slices can be exploded. */ get: function () { return this.i.b8; }, set: function (v) { this.i.b8 = ensureBool(v); this._a("allowSliceExplosion", this.i.b8); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "explodedSlices", { /** * Gets or sets the collection of exploded slice indices. */ get: function () { if (this._explodedSlices === null) { var coll = new IgcIndexCollection(); var innerColl = this.i.explodedSlices; if (!innerColl) { innerColl = new IndexCollection_internal(); } this._explodedSlices = coll._fromInner(innerColl); this.i.explodedSlices = innerColl; } return this._explodedSlices; }, set: function (v) { if (this._explodedSlices !== null) { this._explodedSlices._setSyncTarget(null); this._explodedSlices = null; } var coll = new IgcIndexCollection(); this._explodedSlices = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(Number_$type); var innerColl = this.i.explodedSlices; if (!innerColl) { innerColl = new IndexCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._explodedSlices._setSyncTarget(syncColl); this.i.explodedSlices = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelExtent", { /** * Gets or sets the pixel amount by which the labels are offset from the edge of the slices. */ get: function () { return this.i.db; }, set: function (v) { this.i.db = +v; this._a("labelExtent", this.i.db); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "startAngle", { /** * Gets or sets the starting angle of the chart. * The default zero value is equivalent to 3 o'clock. */ get: function () { return this.i.di; }, set: function (v) { this.i.di = +v; this._a("startAngle", this.i.di); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "sweepDirection", { /** * Gets or sets the rotational direction of the chart. */ get: function () { return this.i.i3; }, set: function (v) { this.i.i3 = ensureEnum(SweepDirection_$type, v); this._a("sweepDirection", enumToString(SweepDirection_$type, this.i.i3)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersCategoryFill", { /** * Gets or sets the fill brush. */ get: function () { return this.i.jb ? this.i.jb.fill : null; }, set: function (v) { this.ensureOthersCategoryStyle(); this.i.jb.fill = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersCategoryStroke", { /** * Gets or sets the stroke brush. */ get: function () { return this.i.jb ? this.i.jb.stroke : null; }, set: function (v) { this.ensureOthersCategoryStyle(); this.i.jb.stroke = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersCategoryStrokeThickness", { /** * Gets or sets the stroke thickness. */ get: function () { return this.i.jb ? this.i.jb.strokeThickness : NaN; }, set: function (v) { this.ensureOthersCategoryStyle(); this.i.jb.strokeThickness = +v; this._a("othersCategoryStrokeThickness", this.i.jb.strokeThickness); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersCategoryOpacity", { /** * Gets or sets the opacity. */ get: function () { return this.i.jb ? this.i.jb.opacity : NaN; }, set: function (v) { this.ensureOthersCategoryStyle(); this.i.jb.opacity = +v; this._a("othersCategoryOpacity", this.i.jb.opacity); }, enumerable: false, configurable: true }); IgcPieChartBaseComponent.prototype.ensureOthersCategoryStyle = function () { if (this.i.jb) { return; } this.i.jb = new Style(); }; Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedSliceFill", { /** * Gets or sets the fill brush. */ get: function () { return this.i.jc ? this.i.jc.fill : null; }, set: function (v) { this.ensureSelectedStyle(); this.i.jc.fill = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedSliceStroke", { /** * Gets or sets the stroke brush. */ get: function () { return this.i.jc ? this.i.jc.stroke : null; }, set: function (v) { this.ensureSelectedStyle(); this.i.jc.stroke = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedSliceStrokeThickness", { /** * Gets or sets the stroke thickness. */ get: function () { return this.i.jc ? this.i.jc.strokeThickness : NaN; }, set: function (v) { this.ensureSelectedStyle(); this.i.jc.strokeThickness = +v; this._a("selectedSliceStrokeThickness", this.i.jc.strokeThickness); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedSliceOpacity", { /** * Gets or sets the opacity. */ get: function () { return this.i.jc ? this.i.jc.opacity : NaN; }, set: function (v) { this.ensureSelectedStyle(); this.i.jc.opacity = +v; this._a("selectedSliceOpacity", this.i.jc.opacity); }, enumerable: false, configurable: true }); IgcPieChartBaseComponent.prototype.ensureSelectedStyle = function () { if (this.i.jc) { return; } this.i.jc = new Style(); }; Object.defineProperty(IgcPieChartBaseComponent.prototype, "brushes", { /** * Gets or sets the palette of brushes to use for coloring the slices. */ get: function () { return fromBrushCollection(this.i.am); }, set: function (v) { this.i.am = toBrushCollection(v); this._a("brushes", brushCollectionToString(this.i.am)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "actualBrushes", { /** * Gets the actual palette of brushes to use for coloring the slices. */ get: function () { return fromBrushCollection(this.i.ak); }, set: function (v) { this.i.ak = toBrushCollection(v); this._a("actualBrushes", brushCollectionToString(this.i.ak)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "outlines", { /** * Gets or sets the palette of brushes to use for outlines on the slices. */ get: function () { return fromBrushCollection(this.i.an); }, set: function (v) { this.i.an = toBrushCollection(v); this._a("outlines", brushCollectionToString(this.i.an)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "actualOutlines", { /** * Gets the actual palette of brushes to use for outlines on the slices. */ get: function () { return fromBrushCollection(this.i.al); }, set: function (v) { this.i.al = toBrushCollection(v); this._a("actualOutlines", brushCollectionToString(this.i.al)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelFormat", { /** * Gets or sets the label format string to use for the label. */ get: function () { return this.i.ef; }, set: function (v) { this.i.ef = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelFormatSpecifiers", { /** * Gets or sets the format specifiers to use with the LabelFormat string. */ get: function () { return this.i.ag; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.ag = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersLabelFormat", { /** * Gets or sets the label format string to use for the label. */ get: function () { return this.i.fa; }, set: function (v) { this.i.fa = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "othersLabelFormatSpecifiers", { /** * Gets or sets the format specifiers to use with the OthersLabelFormat string. */ get: function () { return this.i.aj; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.aj = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendLabelFormat", { /** * Gets or sets the label format string to use for the label. */ get: function () { return this.i.ew; }, set: function (v) { this.i.ew = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendLabelFormatSpecifiers", { /** * Gets or sets the format specifiers to use with the LegendLabelFormat string. */ get: function () { return this.i.ah; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.ah = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendOthersLabelFormat", { /** * Gets or sets the label format string to use for the label. */ get: function () { return this.i.e1; }, set: function (v) { this.i.e1 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendOthersLabelFormatSpecifiers", { /** * Gets or sets the format specifiers to use with the LegendOthersLabelFormat string. */ get: function () { return this.i.ai; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.ai = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendItemTemplate", { /** * Gets or sets the LegendItemTemplate property. * The legend item control content is created according to the LegendItemTemplate on-demand by * the chart object itself. */ get: function () { return this.i.legendItemTemplate; }, set: function (v) { this.i.legendItemTemplate = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendItemBadgeTemplate", { /** * Gets or sets the LegendItemBadgeTemplate property. * The legend item badge is created according to the LegendItemBadgeTemplate on-demand by * the chart object itself. */ get: function () { return this.i.legendItemBadgeTemplate; }, set: function (v) { this.i.legendItemBadgeTemplate = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "isDragInteractionEnabled", { /** * Gets or sets whether the pie chart will handle drag interaction and make them avaiilable in its events. */ get: function () { return this.i.ce; }, set: function (v) { this.i.ce = ensureBool(v); this._a("isDragInteractionEnabled", this.i.ce); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "isSurfaceInteractionDisabled", { /** * Gets or sets whether all surface interactions with the plot area should be disabled. */ get: function () { return this.i.cf; }, set: function (v) { this.i.cf = ensureBool(v); this._a("isSurfaceInteractionDisabled", this.i.cf); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "shouldDisplayMockData", { /** * Gets or sets whether the pie chart should display mock data when data isn't present. */ get: function () { return this.i.ch; }, set: function (v) { this.i.ch = ensureBool(v); this._a("shouldDisplayMockData", this.i.ch); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "shouldUseSkeletonStyleForMockData", { /** * Gets or sets whether the pie chart should use a skeleton style for mock data. */ get: function () { return this.i.ci; }, set: function (v) { this.i.ci = ensureBool(v); this._a("shouldUseSkeletonStyleForMockData", this.i.ci); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "legendEmptyValuesMode", { /** * Determines display mode for zero values in the legend. * For example, handling zero values as valid slices and providing them with proper appearance settings. */ get: function () { return this.i.a1; }, set: function (v) { this.i.a1 = ensureEnum(LegendEmptyValuesMode_$type, v); this._a("legendEmptyValuesMode", enumToString(LegendEmptyValuesMode_$type, this.i.a1)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "formatLabel", { /** * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. */ get: function () { return this.i.a5; }, set: function (v) { this.i.a5 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "formatLegendLabel", { /** * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart's legend. */ get: function () { return this.i.a6; }, set: function (v) { this.i.a6 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "pixelScalingRatio", { /** * Gets or sets the scaling value used to affect the pixel density of the control. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ get: function () { return this.i.df; }, set: function (v) { this.i.df = +v; this._a("pixelScalingRatio", this.i.df); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "actualPixelScalingRatio", { /** * Resolved pixel scaling ratio. Unless explicitly overridden by the * PieChartBase.PixelScalingRatio property, * this one returns the default ratio enforced by device. High resolution devices will initialize this property * to a higher value. */ get: function () { return this.i.c2; }, set: function (v) { this.i.c2 = +v; this._a("actualPixelScalingRatio", this.i.c2); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectionMode", { /** * Gets or sets which mode to use for selecting slices. */ get: function () { return this.i.bk; }, set: function (v) { this.i.bk = ensureEnum(SliceSelectionMode_$type, v); this._a("selectionMode", enumToString(SliceSelectionMode_$type, this.i.bk)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedItem", { /** * Gets or sets the currently selected data item. If a different data item is provided the pie chart * will select the slice associated with the new item. */ get: function () { return this.i.selectedItem; }, set: function (v) { this.i.selectedItem = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedItems", { /** * Gets the currently selected data items. Adding or removing data items from this collection will * select or deselect the slices associated with those items. */ get: function () { if (this._selectedItems === null) { var coll = new IgcObjectCollection(); var innerColl = this.i.selectedItems; if (!innerColl) { innerColl = new ObjectCollection_internal(0); } this._selectedItems = coll._fromInner(innerColl); this.i.selectedItems = innerColl; } return this._selectedItems; }, set: function (v) { if (this._selectedItems !== null) { this._selectedItems._setSyncTarget(null); this._selectedItems = null; } var coll = new IgcObjectCollection(); this._selectedItems = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(Base.$type); var innerColl = this.i.selectedItems; if (!innerColl) { innerColl = new ObjectCollection_internal(0); } syncColl._inner = innerColl; syncColl.clear(); this._selectedItems._setSyncTarget(syncColl); this.i.selectedItems = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "textStyle", { /** * Manually overrides the style to use for the labels. */ get: function () { return this.i.fq; }, set: function (v) { this.i.fq = v; }, enumerable: false, configurable: true }); IgcPieChartBaseComponent.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.legend && this.legend.name && this.legend.name == name) { return this.legend; } if (this.labelFormatSpecifiers != null && arrayFindByName(this.labelFormatSpecifiers, name)) { return arrayFindByName(this.labelFormatSpecifiers, name); } if (this.othersLabelFormatSpecifiers != null && arrayFindByName(this.othersLabelFormatSpecifiers, name)) { return arrayFindByName(this.othersLabelFormatSpecifiers, name); } if (this.legendLabelFormatSpecifiers != null && arrayFindByName(this.legendLabelFormatSpecifiers, name)) { return arrayFindByName(this.legendLabelFormatSpecifiers, name); } if (this.legendOthersLabelFormatSpecifiers != null && arrayFindByName(this.legendOthersLabelFormatSpecifiers, name)) { return arrayFindByName(this.legendOthersLabelFormatSpecifiers, name); } return null; }; Object.defineProperty(IgcPieChartBaseComponent.prototype, "hasUserValues", { get: function () { return this._hasUserValues; }, enumerable: false, configurable: true }); IgcPieChartBaseComponent.prototype.__m = function (propertyName) { if (!this._inStyling) { this._hasUserValues.add(propertyName); } }; IgcPieChartBaseComponent.prototype._styling = function (container, component, parent) { if (this._inStyling) { return; } this._inStyling = true; this._stylingContainer = container; this._stylingParent = component; var genericPrefix = ""; var typeName = this.i.$type.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } genericPrefix = toSpinal("PieChartBaseComponent"); var additionalPrefixes = []; var prefix = toSpinal(typeName); additionalPrefixes.push(prefix + "-"); var b = this.i.$type.baseType; while (b && b.name != "Object" && b.name != "Base" && b.name != "Control" && b.Name != "DependencyObject" && b.Name != "FrameworkElement") { typeName = b.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } var basePrefix = toSpinal(typeName); additionalPrefixes.push(basePrefix + "-"); b = b.baseType; } if (parent) { var parentTypeName = parent.i.$type.name; if (parentTypeName.indexOf("Xam") === 0) { parentTypeName = parentTypeName.substring(3); } var parentPrefix = toSpinal(parentTypeName); additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-"); additionalPrefixes.push(parentPrefix + "-" + prefix + "-"); } initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes); if (this._otherStyling) { this._otherStyling(container, component, parent); } this._inStyling = false; }; /** * Use to force the pie chart to finish any deferred work before printing or evaluating its visual. * This should only be called if the visual of the pie chart needs to be synchronously saved or evaluated. * Calling this method too often will hinder the performance of the pie chart. */ IgcPieChartBaseComponent.prototype.flush = function () { this.i.f0(); }; /** * Returns the chart visuals expressed as a serialized string. */ IgcPieChartBaseComponent.prototype.exportSerializedVisualData = function () { var iv = this.i.d4(); return (iv); }; /** * Simulates a mouse click action at the specified point. * @param point * The point to click at. */ IgcPieChartBaseComponent.prototype.simulateLeftClick = function (point) { this.i.g5(toPoint(point)); }; /** * Invoked by the containing object to provide reference to the container. * @param container * Reference to the container. */ IgcPieChartBaseComponent.prototype.provideContainer = function (container) { this.i.provideContainer(container); }; /** * Notification from the containing object that the container has been resized. */ IgcPieChartBaseComponent.prototype.notifyContainerResized = function () { this.i.notifyContainerResized(); }; /** * Invoked when the instance is being destroyed. */ IgcPieChartBaseComponent.prototype.destroy = function () { this.i.destroy(); }; IgcPieChartBaseComponent.prototype.notifySetItem = function (source_, index, oldItem, newItem) { this.i.f9(source_, index, oldItem, newItem); }; /** * Manually notifies the pie chart's data source that the data it has bound to has been cleared and needs to be re-examined. * This should not be called if the data that the pie chart is bound to is already observable. * @param source_ * The data source. */ IgcPieChartBaseComponent.prototype.notifyClearItems = function (source_) { this.i.f5(source_); }; IgcPieChartBaseComponent.prototype.notifyInsertItem = function (source_, index, newItem) { this.i.f7(source_, index, newItem); }; IgcPieChartBaseComponent.prototype.notifyRemoveItem = function (source_, index, oldItem) { this.i.f8(source_, index, oldItem); }; /** * Assigns data source for the items. * @param source_ * Array of the data source items. */ IgcPieChartBaseComponent.prototype.setWidgetLevelDataSource = function (source_) { this.i.g4(source_); }; /** * Resets items data source. */ IgcPieChartBaseComponent.prototype.removeWidgetLevelDataSource = function () { this.i.gv(); }; /** * Invoked when style is updated. */ IgcPieChartBaseComponent.prototype.styleUpdated = function () { this.i.g9(); }; Object.defineProperty(IgcPieChartBaseComponent.prototype, "labelClick", { /** * Raised when the slice's label is clicked. */ get: function () { return this._labelClick; }, set: function (ev) { var _this = this; if (this._labelClick_wrapped !== null) { this.i.labelClick = delegateRemove(this.i.labelClick, this._labelClick_wrapped); this._labelClick_wrapped = null; this._labelClick = null; } this._labelClick = ev; this._labelClick_wrapped = function (o, e) { var outerArgs = new IgcLabelClickEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeLabelClick) { _this.beforeLabelClick(_this, outerArgs); } if (_this._labelClick) { _this._labelClick(_this, outerArgs); } }; this.i.labelClick = delegateCombine(this.i.labelClick, this._labelClick_wrapped); ; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedItemChanging", { /** * Raised when the SelectedItem property is changing. This event is cancelable. */ get: function () { return this._selectedItemChanging; }, set: function (ev) { var _this = this; if (this._selectedItemChanging_wrapped !== null) { this.i.selectedItemChanging = delegateRemove(this.i.selectedItemChanging, this._selectedItemChanging_wrapped); this._selectedItemChanging_wrapped = null; this._selectedItemChanging = null; } this._selectedItemChanging = ev; this._selectedItemChanging_wrapped = function (o, e) { var outerArgs = new IgcSelectedItemChangingEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeSelectedItemChanging) { _this.beforeSelectedItemChanging(_this, outerArgs); } if (_this._selectedItemChanging) { _this._selectedItemChanging(_this, outerArgs); } }; this.i.selectedItemChanging = delegateCombine(this.i.selectedItemChanging, this._selectedItemChanging_wrapped); ; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedItemsChanging", { /** * Raised when the SelectedItems collection is changing. This event is cancelable. */ get: function () { return this._selectedItemsChanging; }, set: function (ev) { var _this = this; if (this._selectedItemsChanging_wrapped !== null) { this.i.selectedItemsChanging = delegateRemove(this.i.selectedItemsChanging, this._selectedItemsChanging_wrapped); this._selectedItemsChanging_wrapped = null; this._selectedItemsChanging = null; } this._selectedItemsChanging = ev; this._selectedItemsChanging_wrapped = function (o, e) { var outerArgs = new IgcSelectedItemsChangingEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeSelectedItemsChanging) { _this.beforeSelectedItemsChanging(_this, outerArgs); } if (_this._selectedItemsChanging) { _this._selectedItemsChanging(_this, outerArgs); } }; this.i.selectedItemsChanging = delegateCombine(this.i.selectedItemsChanging, this._selectedItemsChanging_wrapped); ; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedItemChanged", { /** * Raised when the SelectedItem property has changed. */ get: function () { return this._selectedItemChanged; }, set: function (ev) { var _this = this; if (this._selectedItemChanged_wrapped !== null) { this.i.selectedItemChanged = delegateRemove(this.i.selectedItemChanged, this._selectedItemChanged_wrapped); this._selectedItemChanged_wrapped = null; this._selectedItemChanged = null; } this._selectedItemChanged = ev; this._selectedItemChanged_wrapped = function (o, e) { var outerArgs = new IgcSelectedItemChangedEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeSelectedItemChanged) { _this.beforeSelectedItemChanged(_this, outerArgs); } if (_this._selectedItemChanged) { _this._selectedItemChanged(_this, outerArgs); } }; this.i.selectedItemChanged = delegateCombine(this.i.selectedItemChanged, this._selectedItemChanged_wrapped); ; }, enumerable: false, configurable: true }); Object.defineProperty(IgcPieChartBaseComponent.prototype, "selectedItemsChanged", { /** * Raised when the SelectedItems collection