UNPKG

igniteui-webcomponents-charts

Version:

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

1,161 lines 73.8 kB
import { __extends } from "tslib"; import { WebComponentRenderer, WebComponentWrapper } from "igniteui-webcomponents-core"; import { TypeRegistrar } from "igniteui-webcomponents-core"; import { FinancialChart } from './FinancialChart'; import { FinancialChartType_$type } from './FinancialChartType'; import { fromBrushCollection, toBrushCollection, ensureEnum, ensureBool, NamePatcher, enumToString, brushCollectionToString, getAllPropertyNames, toSpinal, brushToString, stringToBrush } from "igniteui-webcomponents-core"; import { IgcXYChartComponent } from './igc-xy-chart-component'; import { DataChartStylingDefaults } from './DataChartStylingDefaults'; import { DataSeriesType } from "igniteui-webcomponents-core"; import { IgcDataContext } from "igniteui-webcomponents-core"; import { FinancialChartVolumeType_$type } from './FinancialChartVolumeType'; import { FinancialChartXAxisMode, FinancialChartXAxisMode_$type } from './FinancialChartXAxisMode'; import { FinancialChartYAxisMode, FinancialChartYAxisMode_$type } from './FinancialChartYAxisMode'; import { HorizontalAlignment_$type } from "igniteui-webcomponents-core"; import { FinancialChartZoomSliderType_$type } from './FinancialChartZoomSliderType'; import { IgcFinancialChartDefaultTemplatesComponent } from './igc-financial-chart-default-templates-component'; import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { IgcFinancialIndicatorTypeCollection } from './igc-financial-indicator-type-collection'; import { FinancialIndicatorTypeCollection as FinancialIndicatorTypeCollection_internal } from './FinancialIndicatorTypeCollection'; import { SyncableObservableCollection$1 } from "igniteui-webcomponents-core"; import { FinancialIndicatorType_$type } from './FinancialIndicatorType'; import { IgcFinancialOverlayTypeCollection } from './igc-financial-overlay-type-collection'; import { FinancialOverlayTypeCollection as FinancialOverlayTypeCollection_internal } from './FinancialOverlayTypeCollection'; import { FinancialOverlayType_$type } from './FinancialOverlayType'; import { IgcIndicatorDisplayTypeCollection } from './igc-indicator-display-type-collection'; import { IndicatorDisplayTypeCollection as IndicatorDisplayTypeCollection_internal } from './IndicatorDisplayTypeCollection'; import { IndicatorDisplayType_$type } from './IndicatorDisplayType'; import { IgcFinancialChartRangeSelectorOptionCollection } from './igc-financial-chart-range-selector-option-collection'; import { FinancialChartRangeSelectorOptionCollection as FinancialChartRangeSelectorOptionCollection_internal } from './FinancialChartRangeSelectorOptionCollection'; import { FinancialChartRangeSelectorOption_$type } from './FinancialChartRangeSelectorOption'; import { IgcFinancialChartCustomIndicatorArgs } from './igc-financial-chart-custom-indicator-args'; import { CustomIndicatorNameCollection as CustomIndicatorNameCollection_internal } from './CustomIndicatorNameCollection'; import { IgcCustomIndicatorNameCollection } from './igc-custom-indicator-name-collection'; import { String_$type } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; var fg = window && window.CSS && window.CSS.supports && /*@__PURE__*/ window.CSS.supports("display", "grid"); var financialChartToolbarStyle = { gridRow: 1, msGridRow: 1 }; var financialChartPriceStyle = { gridRow: 3, msGridRow: 3 }; var financialChartIndicatorsStyle = { gridRow: 4, msGridRow: 4 }; var financialChartVolumeStyle = { gridRow: 5, msGridRow: 5 }; var financialChartZoomSliderStyle = { gridRow: 6, msGridRow: 6 }; var financialChartMainGridStyle = { height: '100%', width: '100%', textAlign: 'left', display: fg ? 'grid' : '-ms-grid', msGridColumns: '100%' }; var financialChartLegendStyle = { gridRow: 2, msGridRow: 2 }; var IgcFinancialChartComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcFinancialChartComponent, _super); function IgcFinancialChartComponent() { var _this = _super.call(this) || this; _this._wrapper = null; _this._initialized = false; _this._toolbarElement = null; _this._renderer = null; _this._disconnected = false; _this._dataSource = null; _this._defaultTooltips = null; _this._dynamicContent = {}; _this._xAxisBreaks = null; _this._indicatorTypes = null; _this._overlayTypes = null; _this._indicatorDisplayTypes = null; _this._rangeSelectorOptions = null; _this._customIndicatorNames = null; _this._applyCustomIndicators = null; _this._applyCustomIndicators_wrapped = null; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this.onDocumentClick = _this.onDocumentClick.bind(_this); if (document) { document.addEventListener("click", _this.onDocumentClick); } _this._renderer = new WebComponentRenderer(_this, document, true, DataChartStylingDefaults); //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 != null) { root = _this._container; } _this._wrapper = _this._renderer; var chart = _this.i; _this._chart = chart; if (chart.xAxis) { _this.rewrapAxis(chart.xAxis); } if (chart.yAxis) { _this.rewrapAxis(chart.yAxis); } if (chart.volumeAxis) { _this.rewrapAxis(chart.volumeAxis); } if (chart.volumeXAxis) { _this.rewrapAxis(chart.volumeXAxis); } if (chart.indicatorAxis) { _this.rewrapAxis(chart.indicatorAxis); } if (chart.indicatorXAxis) { _this.rewrapAxis(chart.indicatorXAxis); } if (chart.zoomSliderAxis) { _this.rewrapAxis(chart.zoomSliderAxis); } if (chart.zoomSliderXAxis) { _this.rewrapAxis(chart.zoomSliderXAxis); } chart.provideContainer(_this._renderer); _this.bindData(); chart.notifyResized(); _this._renderer.addSizeWatcher(function () { _this._checkToolbarSize(); _this._chart.notifyResized(); }); _this._initialized = true; return _this; } Object.defineProperty(IgcFinancialChartComponent.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(IgcFinancialChartComponent.prototype, "width", { get: function () { return this._width; }, set: function (value) { this._width = value; this.style.width = value; this.notifyResized(); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "rangeSelectorTemplate", { get: function () { return this._rangeSelectorTemplate; }, set: function (value) { this._rangeSelectorTemplate = value; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "chartTypePickerTemplate", { get: function () { return this._chartTypePickerTemplate; }, set: function (value) { this._chartTypePickerTemplate = value; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorMenuTemplate", { get: function () { return this._indicatorMenuTemplate; }, set: function (value) { this._indicatorMenuTemplate = value; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "toolbarTemplate", { get: function () { return this._toolbarTemplate; }, set: function (value) { this._toolbarTemplate = value; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "chartTemplate", { get: function () { return this._chartTemplate; }, set: function (value) { this._chartTemplate = value; }, enumerable: false, configurable: true }); IgcFinancialChartComponent.prototype.destroy = function () { this._chart.destroy(); this._wrapper.destroy(); if (document) { document.removeEventListener("click", this.onDocumentClick); } }; IgcFinancialChartComponent.prototype.disconnectedCallback = function () { this._disconnected = true; if (this.i) { this.i.onDetachedFromUI(); } }; IgcFinancialChartComponent.prototype.connectedCallback = function () { if (this._disconnected) { this._disconnected = false; if (this.i) { this.i.onAttachedToUI(); } return; } this.classList.add("ig-financial-chart"); this.classList.add("igc-financial-chart"); 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(); }; IgcFinancialChartComponent.prototype.afterContentInit = function () { this.initializeContent(); }; IgcFinancialChartComponent.prototype._checkToolbarSize = function () { if (this._toolbarElement) { var start = this._toolbarElement; if (start.children.length == 1) { start = start.children[0]; } if (start.children.length == 1) { start = start.children[0]; } var toolbarRoot = start.querySelector(".financialChartToolbar"); var rootRect = toolbarRoot.getBoundingClientRect(); var hideRemaining = false; for (var i = 0; i < toolbarRoot.children.length; i++) { var child = toolbarRoot.children[i]; if (child.nodeType == Node.ELEMENT_NODE) { if (!hideRemaining) { child.style.display = ""; } var childRect = child.getBoundingClientRect(); if (hideRemaining || childRect.left + childRect.width > rootRect.left + rootRect.width) { child.style.display = "none"; hideRemaining = true; } else { child.style.display = ""; } } } } }; IgcFinancialChartComponent.prototype.onDocumentClick = function (ev) { this._chart.onDocumentClick(ev); }; IgcFinancialChartComponent.prototype.rewrapAxis = function (axis) { var axisName = axis.$type.name; var componentName = "Igc" + axisName + "Component"; if (TypeRegistrar.isRegistered(componentName)) { var x = TypeRegistrar.create(componentName); x._implementation = axis; axis.externalObject = x; } else { throw new Error("Axis type not loaded: " + componentName); } }; IgcFinancialChartComponent.prototype.createImplementation = function () { return new FinancialChart(); }; Object.defineProperty(IgcFinancialChartComponent.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcFinancialChartComponent.prototype.createSeriesComponent = function (type) { if (TypeRegistrar.isRegistered(type)) { var s = TypeRegistrar.create(type); s.owner = this; return s; } else { //we shouldn't get here, hopefully. throw Error("series type not loaded: " + type); } }; IgcFinancialChartComponent.prototype.createIndicator = function (typeName) { return this.createSeriesComponent("Igc" + typeName + "Component"); }; IgcFinancialChartComponent.prototype.createOverlay = function (typeName) { return this.createSeriesComponent("Igc" + typeName + "Component"); }; IgcFinancialChartComponent.prototype.createSeries = function (type) { switch (type) { case DataSeriesType.Area: return this.createSeriesComponent('IgcAreaSeriesComponent'); case DataSeriesType.Column: return this.createSeriesComponent('IgcColumnSeriesComponent'); case DataSeriesType.Line: return this.createSeriesComponent('IgcLineSeriesComponent'); case DataSeriesType.FinancialPrice: return this.createSeriesComponent('IgcFinancialPriceSeriesComponent'); case DataSeriesType.ItemToolTipLayer: return this.createSeriesComponent('IgcItemToolTipLayerComponent'); case DataSeriesType.CategoryToolTipLayer: return this.createSeriesComponent('IgcCategoryToolTipLayerComponent'); case DataSeriesType.CrosshairLayer: return this.createSeriesComponent('IgcCrosshairLayerComponent'); case DataSeriesType.FinalValueLayer: return this.createSeriesComponent('IgcFinalValueLayerComponent'); case DataSeriesType.CalloutLayer: return this.createSeriesComponent('IgcCalloutLayerComponent'); case DataSeriesType.DataToolTipLayer: return this.createSeriesComponent('IgcDataToolTipLayerComponent'); case DataSeriesType.TrendLineLayer: return this.createSeriesComponent('IgcTrendLineLayerComponent'); default: return this.createSeriesComponent('IgcColumnSeriesComponent'); } }; IgcFinancialChartComponent.prototype.createXAxis = function (type) { switch (type) { case FinancialChartXAxisMode.Ordinal: if (TypeRegistrar.isRegistered("IgcOrdinalTimeXAxisComponent")) { return TypeRegistrar.create("IgcOrdinalTimeXAxisComponent"); } else if (TypeRegistrar.isRegistered("IgcTimeXAxisComponent")) { return TypeRegistrar.create("IgcTimeXAxisComponent"); } else { throw new Error("not valid axes components loaded"); } case FinancialChartXAxisMode.Time: if (TypeRegistrar.isRegistered("IgcTimeXAxisComponent")) { return TypeRegistrar.create("IgcTimeXAxisComponent"); } else if (TypeRegistrar.isRegistered("IgcOrdinalTimeXAxisComponent")) { return TypeRegistrar.create("IgcOrdinalTimeXAxisComponent"); } else { throw new Error("not valid axes components loaded"); } } }; IgcFinancialChartComponent.prototype.createYAxis = function (type) { switch (type) { case FinancialChartYAxisMode.Numeric: if (TypeRegistrar.isRegistered("IgcNumericYAxisComponent")) { return TypeRegistrar.create("IgcNumericYAxisComponent"); } else if (TypeRegistrar.isRegistered("IgcPercentChangeYAxisComponent")) { return TypeRegistrar.create("IgcPercentChangeYAxisComponent"); } else { throw new Error("not valid axes components loaded"); } case FinancialChartYAxisMode.PercentChange: if (TypeRegistrar.isRegistered("IgcPercentChangeYAxisComponent")) { return TypeRegistrar.create("IgcPercentChangeYAxisComponent"); } else if (TypeRegistrar.isRegistered("IgcNumericYAxisComponent")) { return TypeRegistrar.create("IgcNumericYAxisComponent"); } else { throw new Error("not valid axes components loaded"); } } }; Object.defineProperty(IgcFinancialChartComponent.prototype, "dataSource", { get: function () { return this._dataSource; }, set: function (value) { this._dataSource = value; this.bindData(); }, enumerable: false, configurable: true }); IgcFinancialChartComponent.prototype.bindData = function () { if (this._chart != null && this._chart !== undefined) { this._chart.itemsSource = this._dataSource; } }; IgcFinancialChartComponent.prototype.initializeContent = function () { if (TypeRegistrar.isRegistered("IgcDataChartDefaultTooltipsComponent")) { var d = TypeRegistrar.create("IgcDataChartDefaultTooltipsComponent"); this._defaultTooltips = d; this._onDefaultTooltipsReady(d); //this._container.appendChild(cr.location.nativeElement); } var context = this._chart.getContext(); if (!this._defaultTemplates) { this._defaultTemplates = new IgcFinancialChartDefaultTemplatesComponent(this); } var mainGrid = this._renderer.createElement("div"); mainGrid.addClass("financialChartMainGrid"); mainGrid.setStyleProperty("width", "100%"); mainGrid.setStyleProperty("height", "100%"); mainGrid.setStyleProperty("text-align", "left"); mainGrid.setStyleProperty("display", "-ms-grid"); mainGrid.setStyleProperty("display", "grid"); mainGrid.setStyleProperty("-ms-grid-columns", "100%"); this._container.append(mainGrid); var toolArea = this._renderer.createElement("div"); toolArea.addClass("financialChartToolbarArea"); toolArea.setStyleProperty("-ms-grid-row", "1"); toolArea.setStyleProperty("grid-row", "1"); mainGrid.append(toolArea); this._toolbarElement = toolArea.getNativeElement(); var legend = this._renderer.createElement("div"); legend.addClass("financialChartLegend"); legend.setStyleProperty("-ms-grid-row", "2"); legend.setStyleProperty("grid-row", "2"); mainGrid.append(legend); var price = this._renderer.createElement("div"); price.addClass("financialChartPrice"); price.setStyleProperty("-ms-grid-row", "3"); price.setStyleProperty("grid-row", "3"); mainGrid.append(price); var indicators = this._renderer.createElement("div"); indicators.addClass("financialChartIndicators"); indicators.setStyleProperty("-ms-grid-row", "4"); indicators.setStyleProperty("grid-row", "4"); mainGrid.append(indicators); var volume = this._renderer.createElement("div"); volume.addClass("financialChartVolume"); volume.setStyleProperty("-ms-grid-row", "5"); volume.setStyleProperty("grid-row", "5"); mainGrid.append(volume); var slider = this._renderer.createElement("div"); slider.addClass("financialChartZoomSlider"); slider.setStyleProperty("-ms-grid-row", "6"); slider.setStyleProperty("grid-row", "6"); mainGrid.append(slider); this._mainGridElement = mainGrid.getNativeElement(); this._toolbarTemplateComponent = TypeRegistrar.create("IgcTemplateContentComponent"); this._toolbarTemplateComponent.style.display = "block"; this._toolbarTemplateComponent.style.width = "100%"; this._toolbarTemplateComponent.style.height = "100%"; this._toolbarElement.appendChild(this._toolbarTemplateComponent); var toolbarArea = this._toolbarTemplateComponent; var toolbarContext = context.vm.toolbar; toolbarContext.vm.financialChartIndicatorMenu.template = this.indicatorMenuTemplate ? this.indicatorMenuTemplate : this._defaultTemplates.financialChartIndicatorMenuTemplate; toolbarContext.vm.financialChartIndicatorMenu.vm.notifyChanged = function () { toolbarArea.context = toolbarContext; }; toolbarContext.vm.financialChartTypePicker.template = this.chartTypePickerTemplate ? this.chartTypePickerTemplate : this._defaultTemplates.financialChartTypePickerTemplate; toolbarContext.vm.financialChartTypePicker.vm.notifyChanged = function () { toolbarArea.context = toolbarContext; }; toolbarContext.vm.financialChartRangeSelector.template = this.rangeSelectorTemplate ? this.rangeSelectorTemplate : this._defaultTemplates.financialChartRangeSelectorTemplate; toolbarContext.vm.financialChartRangeSelector.vm.notifyChanged = function () { toolbarArea.context = toolbarContext; }; toolbarContext.template = this.toolbarTemplate ? this.toolbarTemplate : this._defaultTemplates.financialChartToolbarTemplate; var toolContainer = this._toolbarElement; //let toolbarArea = this._templates.toArray()[0]; //let mainArea = this._templates.toArray()[1]; //toolbarArea.contentReady = () => { // toolbarArea.contentReady = null; //} toolbarArea.context = toolbarContext; toolbarArea.template = toolbarContext.template; var ele = this._toolbarElement; //ele.style.width = "100%"; //ele.style.height = "100%"; //if (ele.parentElement != null) { // ele.parentElement.removeChild(ele); //} //toolContainer.appendChild(ele); //this._wrapper.setStyleProperty(ele, "display", "") ele.style.display = ""; var legendContainer = context.legendContainer.rootWrapper.getNativeElement(); var mainContainer = context.container.rootWrapper.getNativeElement(); var indicatorContainer = context.indicatorsContainer.rootWrapper.getNativeElement(); var volumeContainer = context.volumeContainer.rootWrapper.getNativeElement(); var zoomSliderContainer = context.zoomContainer.rootWrapper.getNativeElement(); var main = this._mainGridElement; var templateMain = main.querySelector(".financialChartPrice"); var templateToolbar = main.querySelector(".financialChartToolbar"); var templateLegend = main.querySelector(".financialChartLegend"); var templateIndicator = main.querySelector(".financialChartIndicators"); var templateVolume = main.querySelector(".financialChartVolume"); var templateZoomSlider = main.querySelector(".financialChartZoomSlider"); var grid = main; // main.querySelector(".financialChartMainGrid"); var gridWrapper = new WebComponentWrapper(grid, this._wrapper); this._chart.provideGrid(gridWrapper); this._checkToolbarSize(); templateMain.appendChild(mainContainer); //templateToolbar.appendChild(toolContainer); templateLegend.appendChild(legendContainer); templateIndicator.appendChild(indicatorContainer); templateVolume.appendChild(volumeContainer); templateZoomSlider.appendChild(zoomSliderContainer); this._styling(this, this); //this._mainElement.nativeElement.parentElement.removeChild(this._mainElement.nativeElement); //this.container.appendChild(this._mainElement.nativeElement); }; IgcFinancialChartComponent.prototype._createZoomSlider = function (hostEle, onReady) { if (!TypeRegistrar.isRegistered("IgcZoomSliderComponent")) { //shouldn't happen. throw new Error("zoom slider component isn't loaded"); } var slider = TypeRegistrar.create("IgcZoomSliderComponent"); slider.className = "test"; slider.width = "100%"; slider.height = "100%"; onReady(slider); }; IgcFinancialChartComponent.prototype.createTooltip = function () { if (!TypeRegistrar.isRegistered("IgcTooltipContainerComponent")) { return null; } var cr = TypeRegistrar.create("IgcTooltipContainerComponent"); var ele = cr; var self = this; ele.updateToolTip = function (c, isSubContent) { if (c.externalObject) { c = c.externalObject; } else { var ext = new IgcDataContext(); ext._implementation = c; c = ext; } if (!isSubContent) { if (ele.parentElement != self._container.getNativeElement()) { if (ele.parentElement != null) { ele.parentElement.removeChild(ele); } self._container.getNativeElement().appendChild(ele); } } else { c.isSubContent = true; } cr.context = c; ele.style.display = "block"; return true; }; ele.hideToolTip = function () { ele.style.display = "none"; }; ele.style.display = "none"; return cr; }; IgcFinancialChartComponent.prototype._ensureTooltipCreated = function (series) { var _this = this; series._ensureTooltipCreated(function () { return _this.createTooltip(); }, function (ele) { var wrapper = new WebComponentWrapper(ele, _this._renderer); wrapper.updateToolTip = ele.updateToolTip; wrapper.hideToolTip = ele.hideToolTip; return wrapper; }); }; // private _createXAxis(): any { // let x = new IgxCategoryXAxisComponent(); // return x.i; // } // private _createYAxis(): any { // let y = new IgxNumericYAxisComponent(); // return y.i; // } IgcFinancialChartComponent.prototype._ensureDefaultTooltip = function (series) { if (this._defaultTooltips == null) { return; } this._defaultTooltips["ensureDefaultTooltip"](series); }; IgcFinancialChartComponent.prototype._onDefaultTooltipsReady = function (cr) { if (this.i.dataChart) { var currSeries = this.i.dataChart.series; for (var i = 0; i < currSeries.count; i++) { if (currSeries.item(i).externalObject.showDefaultTooltip) { this._ensureDefaultTooltip(currSeries.item(i).externalObject); } } } }; Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisBreaks", { /** * TimeAxisBreaks to apply to this chart when in time axis mode, representing spans of time to omit, such as weekends. */ get: function () { if (this._xAxisBreaks === null) { if (!TypeRegistrar.isRegistered("IgcTimeAxisBreakCollection")) { return null; } var coll = TypeRegistrar.create("IgcTimeAxisBreakCollection"); var innerColl = this.i.xAxisBreaks; if (!innerColl) { innerColl = TypeRegistrar.create("TimeAxisBreakCollection"); } this._xAxisBreaks = coll._fromInner(innerColl); this.i._xAxisBreaks = innerColl; } return this._xAxisBreaks; }, set: function (v) { if (this._xAxisBreaks !== null) { this._xAxisBreaks._setSyncTarget(null); this._xAxisBreaks = null; } if (!TypeRegistrar.isRegistered("IgxTimeAxisBreakCollection")) { return; } var coll = TypeRegistrar.create("IgxTimeAxisBreakCollection"); var t = TypeRegistrar.get("TimeAxisBreak"); this._xAxisBreaks = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(t.$type); var innerColl = this.i.xAxisBreaks; if (!innerColl) { innerColl = TypeRegistrar.create("TimeAxisBreakCollection"); } syncColl._inner = innerColl; syncColl.clear(); this._xAxisBreaks._setSyncTarget(syncColl); this.i._xAxisBreaks = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent, "observedAttributes", { get: function () { if (IgcFinancialChartComponent._observedAttributesIgcFinancialChartComponent == null) { var names = getAllPropertyNames(IgcFinancialChartComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcFinancialChartComponent._observedAttributesIgcFinancialChartComponent = names; } return IgcFinancialChartComponent._observedAttributesIgcFinancialChartComponent; }, enumerable: false, configurable: true }); IgcFinancialChartComponent.register = function () { if (!IgcFinancialChartComponent._isElementRegistered) { IgcFinancialChartComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcFinancialChartComponent.htmlTagName, IgcFinancialChartComponent); } }; Object.defineProperty(IgcFinancialChartComponent.prototype, "leftMargin", { get: function () { return this.i.j6; }, set: function (v) { this.i.j6 = +v; this._a("leftMargin", this.i.j6); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "isHorizontalZoomEnabled", { get: function () { return this.i.ha; }, set: function (v) { this.i.ha = ensureBool(v); this._a("isHorizontalZoomEnabled", this.i.ha); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "toolbarHeight", { get: function () { return this.i.ama; }, set: function (v) { this.i.ama = +v; this._a("toolbarHeight", this.i.ama); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "domainType", { /** * Gets domain type of this chart */ get: function () { return this.i.cb; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisIsLogarithmic", { /** * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one. * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. */ get: function () { return this.i.ak9; }, set: function (v) { this.i.ak9 = ensureBool(v); this._a("yAxisIsLogarithmic", this.i.ak9); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisLogarithmBase", { /** * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis. * This property is effective only when YAxisIsLogarithmic is true. */ get: function () { return this.i.am7; }, set: function (v) { this.i.am7 = +v; this._a("yAxisLogarithmBase", this.i.am7); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisInterval", { /** * Gets or sets the distance between each label and grid line along the Y-axis. * * The `YAxisInterval` determines how often to show a label, tickmark, and/or gridline along the y-axis. Set this property to a number less than the numeric range of the y-axis. */ get: function () { return this.i.amj; }, set: function (v) { this.i.amj = +v; this._a("yAxisInterval", this.i.amj); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisMinimumValue", { /** * Gets or sets the data value corresponding to the minimum value of the Y-axis. * * The `YAxisMinimumValue` determines starting value of labels, tickmarks, and gridlines on the y-axis. */ get: function () { return this.i.aml; }, set: function (v) { this.i.aml = +v; this._a("yAxisMinimumValue", this.i.aml); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisMaximumValue", { /** * Gets or sets the data value corresponding to the maximum value of the Y-axis. * * The `YAxisMaximumValue` determines ending value of labels, tickmarks, and gridlines on the y-axis. */ get: function () { return this.i.amk; }, set: function (v) { this.i.amk = +v; this._a("yAxisMaximumValue", this.i.amk); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisMinorInterval", { /** * Gets or sets the frequency of displayed minor lines along the Y-axis. * * The `YAxisMinorInterval` determines how often to show minor gridline along the y-axis. Set this property to a number less than the `YAxisInterval` and the numeric range of the y-axis. */ get: function () { return this.i.amm; }, set: function (v) { this.i.amm = +v; this._a("yAxisMinorInterval", this.i.amm); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisActualMinimum", { /** * Gets the current minimum value for the Y-axis. */ get: function () { return this.i.ami; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisActualMaximum", { /** * Gets the current maximum value for the Y-axis. */ get: function () { return this.i.amh; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "volumeType", { /** * The type of series to display in the volume pane. * * Use the `VolumeType` property to set a type of all series that will be rendered in the volume pane, e.g. */ get: function () { return this.i.ai9; }, set: function (v) { this.i.ai9 = ensureEnum(FinancialChartVolumeType_$type, v); this._a("volumeType", enumToString(FinancialChartVolumeType_$type, this.i.ai9)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisMode", { /** * The scaling mode of the X-axis. * * Use the `XAxisMode` property to plot data items without any breaks in data range (Ordinal mode) or with breaks in data range (Time mode) such as weekends/holidays. Note that the Ordinal axis mode is less expensive to use in the financial chart than the Time axis mode. */ get: function () { return this.i.ajb; }, set: function (v) { this.i.ajb = ensureEnum(FinancialChartXAxisMode_$type, v); this._a("xAxisMode", enumToString(FinancialChartXAxisMode_$type, this.i.ajb)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisZoomMaximumCategoryRange", { /** * Gets or sets number of visible categories at maximum zooming level * This property works only with ordinal XAxisMode and it is overridden by chart's WindowRectMinWidth property */ get: function () { return this.i.amc; }, set: function (v) { this.i.amc = +v; this._a("xAxisZoomMaximumCategoryRange", this.i.amc); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisZoomToCategoryStart", { /** * Gets or sets starting category that chart will move its zoom window. Acceptable value is between 0 and number of data items * This property works only with ordinal XAxisMode and it is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get: function () { return this.i.amf; }, set: function (v) { this.i.amf = +v; this._a("xAxisZoomToCategoryStart", this.i.amf); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisZoomMaximumItemSpan", { /** * Gets or sets maximum pixel span of series item that will be visible at maximum zooming level * This property ensures that series item does not get stretch above specified value. * This property works only with ordinal XAxisMode and it is overridden by chart's WindowRectMinWidth property */ get: function () { return this.i.amd; }, set: function (v) { this.i.amd = +v; this._a("xAxisZoomMaximumItemSpan", this.i.amd); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisZoomToCategoryRange", { /** * Gets or sets number of categories that the chart will zoom in and fill plot area * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get: function () { return this.i.ame; }, set: function (v) { this.i.ame = +v; this._a("xAxisZoomToCategoryRange", this.i.ame); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisZoomToItemSpan", { /** * Gets or sets pixel span of series item that will be used to zoom chart such that the item has desired span * Chart will automatically zoom in until series item has specified pixel span. * This property works only with ordinal XAxisMode and it is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get: function () { return this.i.amg; }, set: function (v) { this.i.amg = +v; this._a("xAxisZoomToItemSpan", this.i.amg); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisMode", { /** * The scaling mode of the Y-axis. * * Use the `YAxisMode` property to plot data items using their actual values (Numeric) or using percent changes from the first data point (PercentChange), e.g. */ get: function () { return this.i.ajd; }, set: function (v) { this.i.ajd = ensureEnum(FinancialChartYAxisMode_$type, v); this._a("yAxisMode", enumToString(FinancialChartYAxisMode_$type, this.i.ajd)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "isToolbarVisible", { /** * A boolean property controlling the visibility of the toolbar. */ get: function () { return this.i.ak2; }, set: function (v) { this.i.ak2 = ensureBool(v); this._a("isToolbarVisible", this.i.ak2); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "chartType", { /** * The type of price series to display in the main chart. * * Use the `ChartType` property to set a type of series that will be used to render prices in the Financial Chart control, e.g. */ get: function () { return this.i.ai4; }, set: function (v) { this.i.ai4 = ensureEnum(FinancialChartType_$type, v); this._a("chartType", enumToString(FinancialChartType_$type, this.i.ai4)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisLabelHorizontalAlignment", { /** * Gets or sets Horizontal alignment of Y-axis labels. */ get: function () { return this.i.agw; }, set: function (v) { this.i.agw = ensureEnum(HorizontalAlignment_$type, v); this._a("yAxisLabelHorizontalAlignment", enumToString(HorizontalAlignment_$type, this.i.agw)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "isWindowSyncedToVisibleRange", { /** * A boolean indicating whether the chart should automatically zoom in vertically on the currently visible range of data. * When this property is set to true, panning and zooming along the X-axis will result in a corresponding zoom on the Y-axis, so that the visible range of data fills the zoom window as fully as possible. */ get: function () { return this.i.ak3; }, set: function (v) { this.i.ak3 = ensureBool(v); this._a("isWindowSyncedToVisibleRange", this.i.ak3); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorTypes", { /** * A collection indicating what financial indicator types to display on the Financial Chart. * * Use the `IndicatorTypes` property to set types of indicators that will be rendered below the price pane in the Financial Chart control, e.g. */ get: function () { if (this._indicatorTypes === null) { var coll = new IgcFinancialIndicatorTypeCollection(); var innerColl = this.i.aji; if (!innerColl) { innerColl = new FinancialIndicatorTypeCollection_internal(0); } this._indicatorTypes = coll._fromInner(innerColl); this.i.aji = innerColl; } return this._indicatorTypes; }, set: function (v) { if (this._indicatorTypes !== null) { this._indicatorTypes._setSyncTarget(null); this._indicatorTypes = null; } var coll = new IgcFinancialIndicatorTypeCollection(); this._indicatorTypes = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(FinancialIndicatorType_$type); var innerColl = this.i.aji; if (!innerColl) { innerColl = new FinancialIndicatorTypeCollection_internal(0); } syncColl._inner = innerColl; syncColl.clear(); this._indicatorTypes._setSyncTarget(syncColl); this.i.aji = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "overlayTypes", { /** * A collection indicating what financial overlay types to display on the Financial Chart. * * Use the `OverlayTypes` property to set types of overlays that will be rendered behind price series in the Financial Chart control, e.g. */ get: function () { if (this._overlayTypes === null) { var coll = new IgcFinancialOverlayTypeCollection(); var innerColl = this.i.ajk; if (!innerColl) { innerColl = new FinancialOverlayTypeCollection_internal(0); } this._overlayTypes = coll._fromInner(innerColl); this.i.ajk = innerColl; } return this._overlayTypes; }, set: function (v) { if (this._overlayTypes !== null) { this._overlayTypes._setSyncTarget(null); this._overlayTypes = null; } var coll = new IgcFinancialOverlayTypeCollection(); this._overlayTypes = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(FinancialOverlayType_$type); var innerColl = this.i.ajk; if (!innerColl) { innerColl = new FinancialOverlayTypeCollection_internal(0); } syncColl._inner = innerColl; syncColl.clear(); this._overlayTypes._setSyncTarget(syncColl); this.i.ajk = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisAbbreviateLargeNumbers", { /** * Gets or sets whether the large numbers on the Y-axis labels are abbreviated. */ get: function () { return this.i.ak7; }, set: function (v) { this.i.ak7 = ensureBool(v); this._a("yAxisAbbreviateLargeNumbers", this.i.ak7); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "resolution", { /** * Gets or sets the rendering resolution for all series in this chart. * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. */ get: function () { return this.i.ke; }, set: function (v) { this.i.ke = +v; this._a("resolution", this.i.ke); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisEnhancedIntervalPreferMoreCategoryLabels", { /** * Gets or sets whether the x axis enhanced interval management should prefer to show all the labels if possible without collisions for supported types of category axes. This is for use with EnhancedIntervalMinimumCharacters = -1 and axes that have an integral interval. */ get: function () { return this.i.ak6; }, set: function (v) { this.i.ak6 = ensureBool(v); this._a("xAxisEnhancedIntervalPreferMoreCategoryLabels", this.i.ak6); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisEnhancedIntervalPreferMoreCategoryLabels", { /** * Gets or sets whether the y axis enhanced interval management should prefer to show all the labels if possible without collisions for supported types of category axes. This is for use with EnhancedIntervalMinimumCharacters = -1 and axes that have an integral interval. */ get: function () { return this.i.ak8; }, set: function (v) { this.i.ak8 = ensureBool(v); this._a("yAxisEnhancedIntervalPreferMoreCategoryLabels", this.i.ak8); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFinancialChartComponent.prototype, "zoomSliderType", { /** * Gets or sets type of series to display in the zoom slider pane. * * Use the `ZoomSliderType` property to set a type of all series that will be rendered in the zoom pane, e.g. */ get: function () { return this.i.ajg; }, set: function (v) { this.i.ajg = ensureEnum(FinancialC