UNPKG

igniteui-webcomponents-charts

Version:

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

1,143 lines (1,137 loc) 40.2 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends, __values } from "tslib"; import { WebComponentRenderer, WebComponentWrapper } from "igniteui-webcomponents-core"; import { Visibility_$type } from "igniteui-webcomponents-core"; import { TypeRegistrar } from "igniteui-webcomponents-core"; import { XamSparkline } from './XamSparkline'; import { brushToString, stringToBrush, ensureBool, ensureEnum, initializePropertiesFromCss, NamePatcher, toSpinal, fromSpinal, enumToString, getAllPropertyNames, arrayFindByName } from "igniteui-webcomponents-core"; import { IgcDataContext } from "igniteui-webcomponents-core"; import { SparklineStylingDefaults } from './SparklineStylingDefaults'; import { TrendLineType_$type } from "igniteui-webcomponents-core"; import { SparklineDisplayType_$type } from './SparklineDisplayType'; import { UnknownValuePlotting_$type } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; import { IgcHTMLElement } from "igniteui-webcomponents-core"; export var IgcSparklineComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcSparklineComponent, _super); function IgcSparklineComponent() { var _this = _super.call(this) || this; _this._dataSource = null; _this._disconnected = false; _this._tooltipTemplate = null; _this._tooltipContent = null; _this._defaultTooltips = 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; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this._renderer = new WebComponentRenderer(_this, document, true, SparklineStylingDefaults); _this._implementation = _this.createImplementation(); _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 sparkline = _this.i; _this._sparkline = sparkline; sparkline.provideContainer(_this._renderer); var mut = new MutationObserver(function (list) { var e_1, _b; try { for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) { var mutation = list_1_1.value; if (mutation.type == 'childList') { //this.updateContentRanges(); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (list_1_1 && !list_1_1.done && (_b = list_1.return)) _b.call(list_1); } finally { if (e_1) throw e_1.error; } } }); mut.observe(_this, { childList: true }); _this._renderer.addSizeWatcher(function () { _this._sparkline.notifyResized(); }); return _this; } Object.defineProperty(IgcSparklineComponent.prototype, "dataSource", { get: function () { if (this._dataSource != null) { return this._dataSource; } return this.i.itemsSource; }, set: function (value) { this._dataSource = value; this.i.itemsSource = this._dataSource; //console.log("setting axis data source: " + value) }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "height", { get: function () { return this._height; }, set: function (value) { this._height = value; this.style.height = value; this.notifyResized(); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "width", { get: function () { return this._width; }, set: function (value) { this._width = value; this.style.width = value; this.notifyResized(); }, enumerable: false, configurable: true }); IgcSparklineComponent.prototype.destroy = function () { this._sparkline.destroy(); this._wrapper.destroy(); }; IgcSparklineComponent.prototype.createImplementation = function () { return new XamSparkline(); }; IgcSparklineComponent.prototype.disconnectedCallback = function () { this._disconnected = true; if (this.i) { this.i.onDetachedFromUI(); } }; IgcSparklineComponent.prototype.connectedCallback = function () { if (this._disconnected) { this._disconnected = false; if (this.i) { this.i.onAttachedToUI(); } return; } this.classList.add("ig-sparkline"); this.classList.add("igc-sparkline"); 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(); }; IgcSparklineComponent.prototype.afterContentInit = function () { this.i.notifyResized(); }; Object.defineProperty(IgcSparklineComponent.prototype, "tooltipTemplate", { get: function () { return this._tooltipTemplate; }, set: function (value) { this._tooltipTemplate = value; if (value == null) { if (this._tooltipContent !== null) { this._tooltipContent.destroy(); this._tooltipContent = null; } } if (this._tooltipContent != null) { this._tooltipContent.instance.template = this._tooltipTemplate; } else { this._ensureTooltipCreated(); } }, enumerable: false, configurable: true }); IgcSparklineComponent.prototype._ensureTooltipCreated = function () { if (this.i.toolTip == null) { var tooltip = this.createTooltip(); if (tooltip == null) { return; } this._tooltipContent = tooltip; tooltip.instance.template = this._tooltipTemplate; this.i.toolTip = this.createWrapper(tooltip); } }; IgcSparklineComponent.prototype.createWrapper = function (ele) { var wrapper = new WebComponentWrapper(ele, this._renderer); wrapper.updateToolTip = ele.updateToolTip; wrapper.hideToolTip = ele.hideToolTip; return wrapper; }; IgcSparklineComponent.prototype._ensureDefaultTooltip = function () { if (this._defaultTooltips == null) { return; } this._defaultTooltips["ensureDefaultTooltip"](this); }; IgcSparklineComponent.prototype._onDefaultTooltipsReady = function (cr) { this._ensureDefaultTooltip(); }; IgcSparklineComponent.prototype.createTooltip = function () { if (!TypeRegistrar.isRegistered("IgcTooltipContainerComponent")) { return null; } var cr = TypeRegistrar.create("IgcTooltipContainerComponent"); var ele = cr; var self = this; ele.updateToolTip = function (c) { if (c.externalObject) { c = c.externalObject; } else { var ext = new IgcDataContext(); ext._implementation = c; c = ext; } if (ele.parentElement != self._container.getNativeElement()) { if (ele.parentElement != null) { ele.parentElement.removeChild(ele); } self._container.append(this._renderer.createWrapper(ele)); } cr.context = c; ele.style.display = "block"; return true; }; ele.hideToolTip = function () { ele.style.display = "none"; }; ele.style.display = "none"; return cr; }; Object.defineProperty(IgcSparklineComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; } /** * @hidden */, enumerable: false, configurable: true }); IgcSparklineComponent._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); }; IgcSparklineComponent.prototype._enqueueSetAttribute = function (attrName, attrValue) { this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue }); }; IgcSparklineComponent.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; }; IgcSparklineComponent.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; }; Object.defineProperty(IgcSparklineComponent, "observedAttributes", { get: function () { if (IgcSparklineComponent._observedAttributesIgcSparklineComponent == null) { var names = getAllPropertyNames(IgcSparklineComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcSparklineComponent._observedAttributesIgcSparklineComponent = names; } return IgcSparklineComponent._observedAttributesIgcSparklineComponent; }, enumerable: false, configurable: true }); IgcSparklineComponent.prototype.attributeChangedCallback = function (name, oldValue, newValue) { if (this._settingAttributes) { return; } var setName = fromSpinal(name); this._updatingFromAttribute = true; this[setName] = newValue; this._updatingFromAttribute = false; }; IgcSparklineComponent.register = function () { if (!IgcSparklineComponent._isElementRegistered) { IgcSparklineComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcSparklineComponent.htmlTagName, IgcSparklineComponent); } }; Object.defineProperty(IgcSparklineComponent.prototype, "brush", { /** * Gets or sets the sparkline brush. */ get: function () { return brushToString(this.i.e8); }, set: function (v) { this.i.e8 = stringToBrush(v); this._a("brush", brushToString(this.i.e8)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "negativeBrush", { /** * Gets or sets the negative brush of the sparkline. */ get: function () { return brushToString(this.i.ff); }, set: function (v) { this.i.ff = stringToBrush(v); this._a("negativeBrush", brushToString(this.i.ff)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "markerBrush", { /** * Gets or sets the marker brush of the sparkline. */ get: function () { return brushToString(this.i.fe); }, set: function (v) { this.i.fe = stringToBrush(v); this._a("markerBrush", brushToString(this.i.fe)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "negativeMarkerBrush", { /** * Gets or sets the negative marker brush of the sparkline. */ get: function () { return brushToString(this.i.fg); }, set: function (v) { this.i.fg = stringToBrush(v); this._a("negativeMarkerBrush", brushToString(this.i.fg)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "firstMarkerBrush", { /** * Gets or sets the first marker brush of the sparkline. */ get: function () { return brushToString(this.i.e9); }, set: function (v) { this.i.e9 = stringToBrush(v); this._a("firstMarkerBrush", brushToString(this.i.e9)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "lastMarkerBrush", { /** * Gets or sets the last marker brush of the sparkline. */ get: function () { return brushToString(this.i.fc); }, set: function (v) { this.i.fc = stringToBrush(v); this._a("lastMarkerBrush", brushToString(this.i.fc)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "highMarkerBrush", { /** * Gets or sets the high marker brush of the sparkline. */ get: function () { return brushToString(this.i.fa); }, set: function (v) { this.i.fa = stringToBrush(v); this._a("highMarkerBrush", brushToString(this.i.fa)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "lowMarkerBrush", { /** * Gets or sets the low marker brush of the sparkline. */ get: function () { return brushToString(this.i.fd); }, set: function (v) { this.i.fd = stringToBrush(v); this._a("lowMarkerBrush", brushToString(this.i.fd)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "trendLineBrush", { /** * Gets or sets the trendline brush of the sparkline. */ get: function () { return brushToString(this.i.fi); }, set: function (v) { this.i.fi = stringToBrush(v); this._a("trendLineBrush", brushToString(this.i.fi)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "horizontalAxisBrush", { /** * Gets or sets the horizontal axis line brush of the sparkline. */ get: function () { return brushToString(this.i.fb); }, set: function (v) { this.i.fb = stringToBrush(v); this._a("horizontalAxisBrush", brushToString(this.i.fb)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "verticalAxisBrush", { /** * Gets or sets the vertical axis line brush of the sparkline. */ get: function () { return brushToString(this.i.fj); }, set: function (v) { this.i.fj = stringToBrush(v); this._a("verticalAxisBrush", brushToString(this.i.fj)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "normalRangeFill", { /** * Gets or sets the normal range brush of the sparkline. */ get: function () { return brushToString(this.i.fh); }, set: function (v) { this.i.fh = stringToBrush(v); this._a("normalRangeFill", brushToString(this.i.fh)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "horizontalAxisVisibility", { /** * Gets or sets the display state of the horizontal axis. */ get: function () { return this.i.fm; }, set: function (v) { this.i.fm = ensureEnum(Visibility_$type, v); this._a("horizontalAxisVisibility", enumToString(Visibility_$type, this.i.fm)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "verticalAxisVisibility", { /** * Gets or sets the display state of the vertical axis. */ get: function () { return this.i.ft; }, set: function (v) { this.i.ft = ensureEnum(Visibility_$type, v); this._a("verticalAxisVisibility", enumToString(Visibility_$type, this.i.ft)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "markerVisibility", { /** * Gets or sets the marker visibility of the sparkline. */ get: function () { return this.i.fp; }, set: function (v) { this.i.fp = ensureEnum(Visibility_$type, v); this._a("markerVisibility", enumToString(Visibility_$type, this.i.fp)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "negativeMarkerVisibility", { /** * Gets or sets the negative marker visibility of the sparkline. */ get: function () { return this.i.fq; }, set: function (v) { this.i.fq = ensureEnum(Visibility_$type, v); this._a("negativeMarkerVisibility", enumToString(Visibility_$type, this.i.fq)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "firstMarkerVisibility", { /** * Gets or sets the first marker visibility of the sparkline. */ get: function () { return this.i.fk; }, set: function (v) { this.i.fk = ensureEnum(Visibility_$type, v); this._a("firstMarkerVisibility", enumToString(Visibility_$type, this.i.fk)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "lastMarkerVisibility", { /** * Gets or sets the last marker visibility of the sparkline. */ get: function () { return this.i.fn; }, set: function (v) { this.i.fn = ensureEnum(Visibility_$type, v); this._a("lastMarkerVisibility", enumToString(Visibility_$type, this.i.fn)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "lowMarkerVisibility", { /** * Gets or sets the low marker visibility of the sparkline. */ get: function () { return this.i.fo; }, set: function (v) { this.i.fo = ensureEnum(Visibility_$type, v); this._a("lowMarkerVisibility", enumToString(Visibility_$type, this.i.fo)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "highMarkerVisibility", { /** * Gets or sets the high marker visibility of the sparkline. */ get: function () { return this.i.fl; }, set: function (v) { this.i.fl = ensureEnum(Visibility_$type, v); this._a("highMarkerVisibility", enumToString(Visibility_$type, this.i.fl)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "normalRangeVisibility", { /** * Gets or sets the normal range visibility of the sparkline. */ get: function () { return this.i.fr; }, set: function (v) { this.i.fr = ensureEnum(Visibility_$type, v); this._a("normalRangeVisibility", enumToString(Visibility_$type, this.i.fr)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "displayNormalRangeInFront", { /** * Gets or sets the position of the normal range on the sparkline. */ get: function () { return this.i.aw; }, set: function (v) { this.i.aw = ensureBool(v); this._a("displayNormalRangeInFront", this.i.aw); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "markerSize", { /** * Gets or sets the marker size of the sparkline. */ get: function () { return this.i.bd; }, set: function (v) { this.i.bd = +v; this._a("markerSize", this.i.bd); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "firstMarkerSize", { /** * Gets or sets the first marker size of the sparkline. */ get: function () { return this.i.a6; }, set: function (v) { this.i.a6 = +v; this._a("firstMarkerSize", this.i.a6); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "lastMarkerSize", { /** * Gets or sets the last marker size of the sparkline. */ get: function () { return this.i.a8; }, set: function (v) { this.i.a8 = +v; this._a("lastMarkerSize", this.i.a8); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "highMarkerSize", { /** * Gets or sets the high marker size of the sparkline. */ get: function () { return this.i.a7; }, set: function (v) { this.i.a7 = +v; this._a("highMarkerSize", this.i.a7); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "lowMarkerSize", { /** * Gets or sets the low marker size of the sparkline. */ get: function () { return this.i.bc; }, set: function (v) { this.i.bc = +v; this._a("lowMarkerSize", this.i.bc); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "negativeMarkerSize", { /** * Gets or sets the negative marker size of the sparkline. */ get: function () { return this.i.bi; }, set: function (v) { this.i.bi = +v; this._a("negativeMarkerSize", this.i.bi); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "lineThickness", { /** * Gets or sets the line thickness of the sparkline. */ get: function () { return this.i.a9; }, set: function (v) { this.i.a9 = +v; this._a("lineThickness", this.i.a9); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "minimum", { /** * Gets or sets the minimum value of the y axis. */ get: function () { return this.i.bh; }, set: function (v) { this.i.bh = +v; this._a("minimum", this.i.bh); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "maximum", { /** * Gets or sets the maximum value of the y axis. */ get: function () { return this.i.bg; }, set: function (v) { this.i.bg = +v; this._a("maximum", this.i.bg); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "valueMemberPath", { /** * Gets or sets the string path to the value column. */ get: function () { return this.i.c9; }, set: function (v) { this.i.c9 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "labelMemberPath", { /** * String identifier of a column or property name to get labels from on each item in the data source. These labels will be retrieved from the first and last item, and displayed by the horizontal axis. */ get: function () { return this.i.ce; }, set: function (v) { this.i.ce = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "trendLineType", { /** * Gets or sets the type of trendline used by the sparkline. */ get: function () { return this.i.ar; }, set: function (v) { this.i.ar = ensureEnum(TrendLineType_$type, v); this._a("trendLineType", enumToString(TrendLineType_$type, this.i.ar)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "trendLinePeriod", { /** * Gets or sets the trendline period used by the sparkline. */ get: function () { return this.i.bq; }, set: function (v) { this.i.bq = +v; this._a("trendLinePeriod", this.i.bq); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "trendLineThickness", { /** * Gets or sets the thickness of the sparkline's trendline. */ get: function () { return this.i.bm; }, set: function (v) { this.i.bm = +v; this._a("trendLineThickness", this.i.bm); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "normalRangeMinimum", { /** * Gets or sets the minimum value of the normal range. */ get: function () { return this.i.bk; }, set: function (v) { this.i.bk = +v; this._a("normalRangeMinimum", this.i.bk); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "normalRangeMaximum", { /** * Gets or sets the maximum value of the normal range. */ get: function () { return this.i.bj; }, set: function (v) { this.i.bj = +v; this._a("normalRangeMaximum", this.i.bj); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "displayType", { /** * Gets or sets the display type of the sparkline. */ get: function () { return this.i.aq; }, set: function (v) { this.i.aq = ensureEnum(SparklineDisplayType_$type, v); this._a("displayType", enumToString(SparklineDisplayType_$type, this.i.aq)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "unknownValuePlotting", { /** * Gets or sets the way null values are interpreted. */ get: function () { return this.i.as; }, set: function (v) { this.i.as = ensureEnum(UnknownValuePlotting_$type, v); this._a("unknownValuePlotting", enumToString(UnknownValuePlotting_$type, this.i.as)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "verticalAxisLabel", { /** * The value or content to display on the vertical axis. * This can be set to a formatted string, such as "{0:n}", or it can be set to a DataTemplate. */ get: function () { return this.i.bt; }, set: function (v) { this.i.bt = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "horizontalAxisLabel", { /** * The value or content to display on the horizontal axis. * This can be set to a formatted string, such as "{0}", or it can be set to a DataTemplate. */ get: function () { return this.i.br; }, set: function (v) { this.i.br = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.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.bp; }, set: function (v) { this.i.bp = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "horizontalLabelFormat", { /** * Gets or sets the label composite format used when creating label values. */ get: function () { return this.i.ca; }, set: function (v) { this.i.ca = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "horizontalLabelFormatSpecifiers", { /** * Gets or sets the format specifiers to use with the HorizontalLabelFormat 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(IgcSparklineComponent.prototype, "verticalLabelFormat", { /** * Gets or sets the label composite format used when creating label values. */ get: function () { return this.i.df; }, set: function (v) { this.i.df = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "verticalLabelFormatSpecifiers", { /** * Gets or sets the format specifiers to use with the VerticalLabelFormat 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(IgcSparklineComponent.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.bl; }, set: function (v) { this.i.bl = +v; this._a("pixelScalingRatio", this.i.bl); }, enumerable: false, configurable: true }); Object.defineProperty(IgcSparklineComponent.prototype, "actualPixelScalingRatio", { /** * Gets the actual scaling value used by the component to affect the pixel density of the control. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ get: function () { return this.i.a5; }, set: function (v) { this.i.a5 = +v; this._a("actualPixelScalingRatio", this.i.a5); }, enumerable: false, configurable: true }); IgcSparklineComponent.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.horizontalLabelFormatSpecifiers != null && arrayFindByName(this.horizontalLabelFormatSpecifiers, name)) { return arrayFindByName(this.horizontalLabelFormatSpecifiers, name); } if (this.verticalLabelFormatSpecifiers != null && arrayFindByName(this.verticalLabelFormatSpecifiers, name)) { return arrayFindByName(this.verticalLabelFormatSpecifiers, name); } return null; }; Object.defineProperty(IgcSparklineComponent.prototype, "hasUserValues", { get: function () { return this._hasUserValues; }, enumerable: false, configurable: true }); IgcSparklineComponent.prototype.__m = function (propertyName) { if (!this._inStyling) { this._hasUserValues.add(propertyName); } }; IgcSparklineComponent.prototype._styling = function (container, component, parent) { if (this._inStyling) { return; } this._inStyling = true; this._stylingContainer = container; this._stylingParent = component; var genericPrefix = ""; var typeName = this.i.$type.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } genericPrefix = toSpinal("SparklineComponent"); var additionalPrefixes = []; var prefix = toSpinal(typeName); additionalPrefixes.push(prefix + "-"); var b = this.i.$type.baseType; while (b && b.name != "Object" && b.name != "Base" && b.name != "Control" && b.Name != "DependencyObject" && b.Name != "FrameworkElement") { typeName = b.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } var basePrefix = toSpinal(typeName); additionalPrefixes.push(basePrefix + "-"); b = b.baseType; } if (parent) { var parentTypeName = parent.i.$type.name; if (parentTypeName.indexOf("Xam") === 0) { parentTypeName = parentTypeName.substring(3); } var parentPrefix = toSpinal(parentTypeName); additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-"); additionalPrefixes.push(parentPrefix + "-" + prefix + "-"); } initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes); if (this._otherStyling) { this._otherStyling(container, component, parent); } this._inStyling = false; }; /** * Provides a container to the sparkline control. * @param container * The container. */ IgcSparklineComponent.prototype.provideContainer = function (container) { this.i.provideContainer(container); }; /** * Notify that the control has resized. */ IgcSparklineComponent.prototype.notifyResized = function () { this.i.notifyResized(); }; IgcSparklineComponent.prototype.notifySetItem = function (source_, index, oldItem, newItem) { this.i.dn(source_, index, oldItem, newItem); }; /** * Used to manually notify the IgxSparklineComponent that the data source has reset or cleared its items. Invoking this method is only necessary if that datasource is not observable. * @param source_ * The data source which was cleared or reset. */ IgcSparklineComponent.prototype.notifyClearItems = function (source_) { this.i.dj(source_); }; IgcSparklineComponent.prototype.notifyInsertItem = function (source_, index, newItem) { this.i.dk(source_, index, newItem); }; IgcSparklineComponent.prototype.notifyRemoveItem = function (source_, index, oldItem) { this.i.dl(source_, index, oldItem); }; /** * Returns the sparkline visuals expressed as a SparklineVisualData object. */ IgcSparklineComponent.prototype.exportVisualData = function () { var iv = this.i.au(); return (iv); }; /** * Returns visuals as a serialized string. */ IgcSparklineComponent.prototype.exportSerializedVisualData = function () { var iv = this.i.by(); return (iv); }; IgcSparklineComponent._observedAttributesIgcSparklineComponent = null; IgcSparklineComponent.htmlTagName = "igc-sparkline"; IgcSparklineComponent._isElementRegistered = false; return IgcSparklineComponent; }(IgcHTMLElement));