UNPKG

igniteui-webcomponents-charts

Version:

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

99 lines (98 loc) 3.9 kB
import { IgcFinancialOverlayComponent } from "./igc-financial-overlay-component"; import { PriceChannelOverlay } from "./PriceChannelOverlay"; import { getAllPropertyNames, toSpinal, toPoint } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents a IgxDataChartComponent Financial Price Channel Overlay series. * Default required members: High, Low * * You can use the `PriceChannelOverlay` to display price volatility. */ export let IgcPriceChannelOverlayComponent = /*@__PURE__*/ (() => { class IgcPriceChannelOverlayComponent extends IgcFinancialOverlayComponent { createImplementation() { return new PriceChannelOverlay(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } connectedCallback() { if (super["connectedCallback"]) { super["connectedCallback"](); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } } disconnectedCallback() { if (super["disconnectedCallback"]) { super["disconnectedCallback"](); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } } static get observedAttributes() { if (IgcPriceChannelOverlayComponent._observedAttributesIgcPriceChannelOverlayComponent == null) { let names = getAllPropertyNames(IgcPriceChannelOverlayComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcPriceChannelOverlayComponent._observedAttributesIgcPriceChannelOverlayComponent = names; } return IgcPriceChannelOverlayComponent._observedAttributesIgcPriceChannelOverlayComponent; } static register() { if (!IgcPriceChannelOverlayComponent._isElementRegistered) { IgcPriceChannelOverlayComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcPriceChannelOverlayComponent.htmlTagName, IgcPriceChannelOverlayComponent); } } /** * Gets or sets the moving average period for the current PriceChannelOverlay object. * The typical, and initial, value for Bollinger band periods is 14. * * You can use the `Period` to set the moving average. * * ```ts * this.series.period = 14; * ``` */ get period() { return this.i.abd; } set period(v) { this.i.abd = +v; this._a("period", this.i.abd); } getSeriesValue(world, useInterpolation, skipUnknowns) { let iv = this.i.i6(toPoint(world), useInterpolation, skipUnknowns); return (iv); } getNextOrExactIndex(world, skipUnknowns) { let iv = this.i.j9(toPoint(world), skipUnknowns); return (iv); } getPreviousOrExactIndex(world, skipUnknowns) { let iv = this.i.kb(toPoint(world), skipUnknowns); return (iv); } } IgcPriceChannelOverlayComponent._observedAttributesIgcPriceChannelOverlayComponent = null; IgcPriceChannelOverlayComponent.htmlTagName = "igc-price-channel-overlay"; IgcPriceChannelOverlayComponent._isElementRegistered = false; return IgcPriceChannelOverlayComponent; })();