igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
1,743 lines • 73.8 kB
JavaScript
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.j2;
},
set: function (v) {
this.i.j2 = +v;
this._a("leftMargin", this.i.j2);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "isHorizontalZoomEnabled", {
get: function () {
return this.i.g6;
},
set: function (v) {
this.i.g6 = ensureBool(v);
this._a("isHorizontalZoomEnabled", this.i.g6);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "toolbarHeight", {
get: function () {
return this.i.als;
},
set: function (v) {
this.i.als = +v;
this._a("toolbarHeight", this.i.als);
},
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.akr;
},
set: function (v) {
this.i.akr = ensureBool(v);
this._a("yAxisIsLogarithmic", this.i.akr);
},
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.amp;
},
set: function (v) {
this.i.amp = +v;
this._a("yAxisLogarithmBase", this.i.amp);
},
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.al1;
},
set: function (v) {
this.i.al1 = +v;
this._a("yAxisInterval", this.i.al1);
},
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.al3;
},
set: function (v) {
this.i.al3 = +v;
this._a("yAxisMinimumValue", this.i.al3);
},
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.al2;
},
set: function (v) {
this.i.al2 = +v;
this._a("yAxisMaximumValue", this.i.al2);
},
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.al4;
},
set: function (v) {
this.i.al4 = +v;
this._a("yAxisMinorInterval", this.i.al4);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisActualMinimum", {
/**
* Gets the current minimum value for the Y-axis.
*/
get: function () {
return this.i.al0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisActualMaximum", {
/**
* Gets the current maximum value for the Y-axis.
*/
get: function () {
return this.i.alz;
},
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.air;
},
set: function (v) {
this.i.air = ensureEnum(FinancialChartVolumeType_$type, v);
this._a("volumeType", enumToString(FinancialChartVolumeType_$type, this.i.air));
},
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.ait;
},
set: function (v) {
this.i.ait = ensureEnum(FinancialChartXAxisMode_$type, v);
this._a("xAxisMode", enumToString(FinancialChartXAxisMode_$type, this.i.ait));
},
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.alu;
},
set: function (v) {
this.i.alu = +v;
this._a("xAxisZoomMaximumCategoryRange", this.i.alu);
},
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.alx;
},
set: function (v) {
this.i.alx = +v;
this._a("xAxisZoomToCategoryStart", this.i.alx);
},
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.alv;
},
set: function (v) {
this.i.alv = +v;
this._a("xAxisZoomMaximumItemSpan", this.i.alv);
},
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.alw;
},
set: function (v) {
this.i.alw = +v;
this._a("xAxisZoomToCategoryRange", this.i.alw);
},
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.aly;
},
set: function (v) {
this.i.aly = +v;
this._a("xAxisZoomToItemSpan", this.i.aly);
},
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.aiv;
},
set: function (v) {
this.i.aiv = ensureEnum(FinancialChartYAxisMode_$type, v);
this._a("yAxisMode", enumToString(FinancialChartYAxisMode_$type, this.i.aiv));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "isToolbarVisible", {
/**
* A boolean property controlling the visibility of the toolbar.
*/
get: function () {
return this.i.akk;
},
set: function (v) {
this.i.akk = ensureBool(v);
this._a("isToolbarVisible", this.i.akk);
},
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.aim;
},
set: function (v) {
this.i.aim = ensureEnum(FinancialChartType_$type, v);
this._a("chartType", enumToString(FinancialChartType_$type, this.i.aim));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "yAxisLabelHorizontalAlignment", {
/**
* Gets or sets Horizontal alignment of Y-axis labels.
*/
get: function () {
return this.i.age;
},
set: function (v) {
this.i.age = ensureEnum(HorizontalAlignment_$type, v);
this._a("yAxisLabelHorizontalAlignment", enumToString(HorizontalAlignment_$type, this.i.age));
},
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.akl;
},
set: function (v) {
this.i.akl = ensureBool(v);
this._a("isWindowSyncedToVisibleRange", this.i.akl);
},
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.ai0;
if (!innerColl) {
innerColl = new FinancialIndicatorTypeCollection_internal(0);
}
this._indicatorTypes = coll._fromInner(innerColl);
this.i.ai0 = 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.ai0;
if (!innerColl) {
innerColl = new FinancialIndicatorTypeCollection_internal(0);
}
syncColl._inner = innerColl;
syncColl.clear();
this._indicatorTypes._setSyncTarget(syncColl);
this.i.ai0 = 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.ai2;
if (!innerColl) {
innerColl = new FinancialOverlayTypeCollection_internal(0);
}
this._overlayTypes = coll._fromInner(innerColl);
this.i.ai2 = 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.ai2;
if (!innerColl) {
innerColl = new FinancialOverlayTypeCollection_internal(0);
}
syncColl._inner = innerColl;
syncColl.clear();
this._overlayTypes._setSyncTarget(syncColl);
this.i.ai2 = 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.akp;
},
set: function (v) {
this.i.akp = ensureBool(v);
this._a("yAxisAbbreviateLargeNumbers", this.i.akp);
},
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.ka;
},
set: function (v) {
this.i.ka = +v;
this._a("resolution", this.i.ka);
},
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.ako;
},
set: function (v) {
this.i.ako = ensureBool(v);
this._a("xAxisEnhancedIntervalPreferMoreCategoryLabels", this.i.ako);
},
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.akq;
},
set: function (v) {
this.i.akq = ensureBool(v);
this._a("yAxisEnhancedIntervalPreferMoreCategoryLabels", this.i.akq);
},
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.aiy;
},
set: function (v) {
this.i.aiy = ensureEnum(FinancialChartZoomSliderType_$type, v);
this._a("zoomSliderType", enumToString(FinancialChartZoomSliderType_$type, this.i.aiy));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "negativeBrushes", {
/**
* Gets or sets the palette used for coloring negative items of Waterfall chart type.
*
* Use the `NegativeBrushes` property to set a collection of brushes that will be used to render fill area of negative elements in the price pane, e.g.
*/
get: function () {
return fromBrushCollection(this.i.ahv);
},
set: function (v) {
this.i.ahv = toBrushCollection(v);
this._a("negativeBrushes", brushCollectionToString(this.i.ahv));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "negativeOutlines", {
/**
* Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall.
*
* Use the `NegativeOutlines` property to set a collection of brushes that will be used to render outline of negative elements in the price pane, e.g.
*/
get: function () {
return fromBrushCollection(this.i.ahw);
},
set: function (v) {
this.i.ahw = toBrushCollection(v);
this._a("negativeOutlines", brushCollectionToString(this.i.ahw));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "overlayBrushes", {
/**
* Brushes to use for filling financial overlays.
*
* Use the `OverlayBrushes` property to set a collection of brushes that will be used to render fill area of overlays in the Financial Chart control, e.g.
*/
get: function () {
return fromBrushCollection(this.i.ahx);
},
set: function (v) {
this.i.ahx = toBrushCollection(v);
this._a("overlayBrushes", brushCollectionToString(this.i.ahx));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "overlayOutlines", {
/**
* Brushes to use for outlining financial overlays.
*
* Use the `OverlayOutlines` property to set a collection of brushes that will be used to render outlines of overlays in the Financial Chart control, e.g.
*/
get: function () {
return fromBrushCollection(this.i.ahy);
},
set: function (v) {
this.i.ahy = toBrushCollection(v);
this._a("overlayOutlines", brushCollectionToString(this.i.ahy));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "volumeOutlines", {
/**
* Brushes to use for outlining volume series in the volume pane.
*
* Use the `VolumeOutlines` property to set a collection of brushes that will be used to render outline of multiple series in the volume pane of the Financial Chart control, e.g.
*/
get: function () {
return fromBrushCollection(this.i.ah0);
},
set: function (v) {
this.i.ah0 = toBrushCollection(v);
this._a("volumeOutlines", brushCollectionToString(this.i.ah0));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "volumeBrushes", {
/**
* Brushes to use for filling volume series in the volume pane.
*
* Use the `VolumeBrushes` property to set a collection of brushes that will be used to render fill area of multiple series in the volume pane of the Financial Chart control, e.g.
*/
get: function () {
return fromBrushCollection(this.i.ahz);
},
set: function (v) {
this.i.ahz = toBrushCollection(v);
this._a("volumeBrushes", brushCollectionToString(this.i.ahz));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorNegativeBrushes", {
/**
* Brushes to use for negative elements in financial indicators.
*
* Use the `IndicatorNegativeBrushes` property to set a collection of brushes that will be used to render negative elements of indicators in the Financial Chart control, e.g.
*/
get: function () {
return fromBrushCollection(this.i.ahu);
},
set: function (v) {
this.i.ahu = toBrushCollection(v);
this._a("indicatorNegativeBrushes", brushCollectionToString(this.i.ahu));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorBrushes", {
/**
* Brushes to use for financial indicators.
*
* Use the `IndicatorBrushes` property to set a collection of brushes that will be used to render positive elements of indicators in the Financial Chart control, e.g.
*/
get: function () {
return fromBrushCollection(this.i.aht);
},
set: function (v) {
this.i.aht = toBrushCollection(v);
this._a("indicatorBrushes", brushCollectionToString(this.i.aht));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "volumeThickness", {
/**
* The outline thickness of volume series in the volume pane.
*
* Use the `VolumeThickness` property to set a number that will be used to render outline thickness of all series in the volume pane, e.g.
*/
get: function () {
return this.i.alt;
},
set: function (v) {
this.i.alt = +v;
this._a("volumeThickness", this.i.alt);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "overlayThickness", {
/**
* The outline thickness of financial overlays.
*
* Use the `OverlayThickness` property to set a number that will be used to render outline thickness of all overlays in the Financial Chart control, e.g.
*/
get: function () {
return this.i.alr;
},
set: function (v) {
this.i.alr = +v;
this._a("overlayThickness", this.i.alr);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "overlayMultiplier", {
/**
* The multiplier of financial overlay, e.g. BollingerBands overlay.
*/
get: function () {
return this.i.alq;
},
set: function (v) {
this.i.alq = +v;
this._a("overlayMultiplier", this.i.alq);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorThickness", {
/**
* The outline or stroke thickness of financial indicators.
*
* Use the `IndicatorThickness` property to set a number that will be used to render outline thickness of all indicators in the Financial Chart control, e.g.
*/
get: function () {
return this.i.alp;
},
set: function (v) {
this.i.alp = +v;
this._a("indicatorThickness", this.i.alp);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorDisplayTypes", {
/**
* The display types of financial indicators.
*
* Use the `IndicatorDisplayTypes` property to set display types that will determine whether render all indicators as area, lines, or columns in the Financial Chart control, e.g.
*/
get: function () {
if (this._indicatorDisplayTypes === null) {
var coll = new IgcIndicatorDisplayTypeCollection();
var innerColl = this.i.ajc;
if (!innerColl) {
innerColl = new IndicatorDisplayTypeCollection_internal();
}
this._indicatorDisplayTypes = coll._fromInner(innerColl);
this.i.ajc = innerColl;
}
return this._indicatorDisplayTypes;
},
set: function (v) {
if (this._indicatorDisplayTypes !== null) {
this._indicatorDisplayTypes._setSyncTarget(null);
this._indicatorDisplayTypes = null;
}
var coll = new IgcIndicatorDisplayTypeCollection();
this._indicatorDisplayTypes = coll._fromOuter(v);
var syncColl = new SyncableObservableCollection$1(IndicatorDisplayType_$type);
var innerColl = this.i.ajc;
if (!innerColl) {
innerColl = new IndicatorDisplayTypeCollection_internal();
}
syncColl._inner = innerColl;
syncColl.clear();
this._indicatorDisplayTypes._setSyncTarget(syncColl);
this.i.ajc = innerColl;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorPeriod", {
/**
* The period of financial indicators, where applicable.
*
* The `indicatorPeriod` property applies to only the `BollingerBands` overlay as well as to these indicators types: `AverageDirectionalIndex`, `AverageTrueRange`, `BollingerBandWidth`, `ChaikinVolatility`, `CommodityChannelIndex`, `DetrendedPriceOscillator`, `FastStochasticOscillator`, `ForceIndex`, `FullStochasticOscillator`, `MoneyFlowIndex`, `PriceChannelOverlay`, `RateOfChangeAndMomentum`, `RelativeStrengthIndex`, `SlowStochasticOscillator`, `StandardDeviation`, `StochRSI`, `TRIX`, `WilliamsPercentR`
*/
get: function () {
return this.i.amk;
},
set: function (v) {
this.i.amk = +v;
this._a("indicatorPeriod", this.i.amk);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorMultiplier", {
/**
* The multiplier of financial indicators, e.g. BollingerBandWidth indicator.
*
* The `IndicatorMultiplier` property applies to only to BollingerBandWidth indicator type.
*/
get: function () {
return this.i.alo;
},
set: function (v) {
this.i.alo = +v;
this._a("indicatorMultiplier", this.i.alo);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorSmoothingPeriod", {
/**
* The smoothing period of financial indicators, where applicable.
*
* The `IndicatorSmoothingPeriod` property applies to only to `FullStochasticOscillator` indicator type.
*/
get: function () {
return this.i.amn;
},
set: function (v) {
this.i.amn = +v;
this._a("indicatorSmoothingPeriod", this.i.amn);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorShortPeriod", {
/**
* The short period of financial indicators, where applicable.
*
* The `IndicatorShortPeriod` property applies only to these indicator types:
*
* - AbsoluteVolumeOscillator,
* - ChaikinOscillator,
* - MovingAverageConvergenceDivergence,
* - PercentagePriceOscillator,
* - PercentageVolumeOscillator,
*/
get: function () {
return this.i.aml;
},
set: function (v) {
this.i.aml = +v;
this._a("indicatorShortPeriod", this.i.aml);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorLongPeriod", {
/**
* The long period of financial indicators, where applicable.
*
* The `IndicatorLongPeriod` property applies only to these indicator types:
*
* - AbsoluteVolumeOscillator,
* - ChaikinOscillator,
* - MovingAverageConvergenceDivergence,
* - PercentagePriceOscillator,
* - PercentageVolumeOscillator,
*/
get: function () {
return this.i.amj;
},
set: function (v) {
this.i.amj = +v;
this._a("indicatorLongPeriod", this.i.amj);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "indicatorSignalPeriod", {
/**
* The signal period of financial indicators, where applicable.
*
* The `IndicatorSignalPeriod` property applies to only to MovingAverageConvergenceDivergence indicator type.
*/
get: function () {
return this.i.amm;
},
set: function (v) {
this.i.amm = +v;
this._a("indicatorSignalPeriod", this.i.amm);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "rangeSelectorOptions", {
/**
* A FinancialChartRangeSelectorOptionCollection containing the available range selector options on the toolbar.
*/
get: function () {
if (this._rangeSelectorOptions === null) {
var coll = new IgcFinancialChartRangeSelectorOptionCollection();
var innerColl = this.i.aii;
if (!innerColl) {
innerColl = new FinancialChartRangeSelectorOptionCollection_internal(0);
}
this._rangeSelectorOptions = coll._fromInner(innerColl);
this.i.aii = innerColl;
}
return this._rangeSelectorOptions;
},
set: function (v) {
if (this._rangeSelectorOptions !== null) {
this._rangeSelectorOptions._setSyncTarget(null);
this._rangeSelectorOptions = null;
}
var coll = new IgcFinancialChartRangeSelectorOptionCollection();
this._rangeSelectorOptions = coll._fromOuter(v);
var syncColl = new SyncableObservableCollection$1(FinancialChartRangeSelectorOption_$type);
var innerColl = this.i.aii;
if (!innerColl) {
innerColl = new FinancialChartRangeSelectorOptionCollection_internal(0);
}
syncColl._inner = innerColl;
syncColl.clear();
this._rangeSelectorOptions._setSyncTarget(syncColl);
this.i.aii = innerColl;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "customIndicatorNames", {
/**
* The names of custom indicators to add to the chart.
* When CustomIndicatorNames is set, the ApplyCustomIndicators event will be raised for each custom indicator name.
*/
get: function () {
if (this._customIndicatorNames === null) {
var coll = new IgcCustomIndicatorNameCollection();
var innerColl = this.i.customIndicatorNames;
if (!innerColl) {
innerColl = new CustomIndicatorNameCollection_internal(0);
}
this._customIndicatorNames = coll._fromInner(innerColl);
this.i.customIndicatorNames = innerColl;
}
return this._customIndicatorNames;
},
set: function (v) {
if (this._customIndicatorNames !== null) {
this._customIndicatorNames._setSyncTarget(null);
this._customIndicatorNames = null;
}
var coll = new IgcCustomIndicatorNameCollection();
this._customIndicatorNames = coll._fromOuter(v);
var syncColl = new SyncableObservableCollection$1(String_$type);
var innerColl = this.i.customIndicatorNames;
if (!innerColl) {
innerColl = new CustomIndicatorNameCollection_internal(0);
}
syncColl._inner = innerColl;
syncColl.clear();
this._customIndicatorNames._setSyncTarget(syncColl);
this.i.customIndicatorNames = innerColl;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "isVerticalZoomEnabled", {
get: function () {
return this.i.he;
},
set: function (v) {
this.i.he = ensureBool(v);
this._a("isVerticalZoomEnabled", this.i.he);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "zoomSliderXAxisMajorStroke", {
/**
* Gets or sets stroke brush of major gridlines on x-axis of the zoom slider pane
*/
get: function () {
return brushToString(this.i.aqz);
},
set: function (v) {
this.i.aqz = stringToBrush(v);
this._a("zoomSliderXAxisMajorStroke", brushToString(this.i.aqz));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "zoomSliderXAxisMajorStrokeThickness", {
/**
* Gets or sets thickness of major gridlines on x-axis of the zoom slider pane
*/
get: function () {
return this.i.al5;
},
set: function (v) {
this.i.al5 = +v;
this._a("zoomSliderXAxisMajorStrokeThickness", this.i.al5);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "isLegendVisible", {
/**
* Gets or sets weather or not a legend is visible between toolbar and chart's plot area
*/
get: function () {
return this.i.akg;
},
set: function (v) {
this.i.akg = ensureBool(v);
this._a("isLegendVisible", this.i.akg);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisMinimumValue", {
/**
* Gets or sets minimum value on x-axis
*/
get: function () {
return this.i.ak6;
},
set: function (v) {
this.i.ak6 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialChartComponent.prototype, "xAxisMaximumValue", {
/**
* Gets or sets maximum value on x-axis
*/
get: function () {
return this.i.ak5;
},
set: function (v) {
this.i.ak5 = v;
},
enumerable: false,
configurable: true
});
IgcFinancialChartComponent.prototype.findByName = function (name) {
var baseResult = _super.prototype.findByName.call(this, name);
if (baseResult) {
return baseResult;
}
if (this.indicatorTypes != null && this.indicatorTypes.findByName && this.indicatorTypes.findByName(name)) {
return this.indicatorTypes.findByName(name);
}
if (this.overlayTypes != null && this.overlayTypes.findByName && this.overlayTypes.findByName(name)) {
return this.overlayTypes.findByName(name);
}
if (this.indicatorDisplayTypes != null && this.indicatorDisplayTypes.findByName && this.indicatorDisplayTypes.findByName(name)) {
return this.indicatorDisplayTypes.findByName(name);
}
if (this.rangeSelectorOptions != null && this.rangeSelectorOptions.findByName && this.rangeSelectorOptions.findByName(name)) {
return this.rangeSelectorOptions.findByName(name);
}
if (this.xAxisBreaks != null && this.xAxisBreaks.findByName && this.xAxisBreaks.findByName(name)) {
return this.xAxisBreaks.findByName(name);
}
return null;
};
/**
* Called by the UI framework to provide a UI container for rendering this control.
* @param container * The UI container element.
*/
IgcFinancialChartComponent.prototype.provideContainer = function (container) {
this.i.provideContainer(container);
};
IgcFinancialChartComponent.prototype.notifyInsertItem = function (source_, index, newItem) {
this.i.vv(source_, index, newItem);
};
IgcFinancialChartComponent.prototype.notifyRemoveItem = function (source_, index, oldItem) {
this.i.vw(source_, index, oldItem);
};
IgcFinancialChartComponent.prototype.notifyClearItems = function (source_) {
this.i.vu(source_);
};
IgcFinancialChartComponent.prototype.notifySetItem = function (source_, index, oldItem, newItem) {
this.i.vy(source_, index, oldItem, newItem);
};
/**
* Returns visuals as a serialized string.
*/
IgcFinancialChartComponent.prototype.exportSerializedVisualData = function () {
var iv = this.i.am9();
return (iv);
};
Object.defineProperty(IgcFinancialChartComponent.prototype, "applyCustomIndicators", {
/**
* Event raised by the chart when custom indicator data is needed from the application.
* During series rendering, event will be raised once for each value in the CustomIndicatorNames collection.
*/
get: function () {
return this._applyCustomIndicators;
},
set: function (ev) {
var _this = this;
if (this._applyCustomIndicators_wrapped !== null) {
this.i.applyCustomIndicators = delegateRemove(this.i.applyCustomIndicators, this._applyCustomIndicators_wrapped);
this._applyCustomIndicators_wrapped = null;
this._applyCustomIndicators = null;
}
this._applyCustomIndicators = ev;
this._applyCustomIndicators_wrapped = function (o, e) {
var outerArgs = new IgcFinancialChartCustomIndicatorArgs();
outerArgs._provideImplementation(e);
if (_this.beforeApplyCustomIndicators) {
_this.beforeApplyCustomIndicators(_this, outerArgs);
}
if (_this._applyCustomIndicators) {
_this._applyCustomIndicators(_this, outerArgs);
}
};
this.i.applyCustomIndicators = delegateCombine(this.i.applyCustomIndicators, this._applyCustomIndicators_wrapped);
;
},
enumerable: false,
configurable: true
});
IgcFinancialChartComponent._observedAttributesIgcFinancialChartComponent = null;
IgcFinancialChartComponent.htmlTagName = "igc-financial-chart";
IgcFinancialChartComponent._isElementRegistered = false;
return IgcFinancialChartComponent;
}(IgcXYChartComponent));
export { IgcFinancialChartComponent };