UNPKG

igniteui-webcomponents-charts

Version:

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

95 lines (93 loc) 3.66 kB
import { IgcFinancialSeriesComponent } from "./igc-financial-series-component"; import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core"; /** * Represents the base functionality for a IgxDataChartComponent financial overlay series. * The difference between a FinancialIndicator and a FinancialOverlay is small. * Overlays are usually drawn against the same axes as the price, but they don't * have to be. Overlays mostly display multiple values, but not all of them, and so * so some indicators. * * The `FinancialOverlay` class represents the base functionality for a IgxDataChartComponent financial overlay series. */ export let IgcFinancialOverlayComponent = /*@__PURE__*/ (() => { class IgcFinancialOverlayComponent extends IgcFinancialSeriesComponent { /** * @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 (IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent == null) { let names = getAllPropertyNames(IgcFinancialOverlayComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent = names; } return IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent; } /** * Gets whether the series is financial overlay */ get isFinancialOverlay() { return this.i.fa; } /** * Gets or sets the number of values to hide at the beginning of the indicator. * * Use the `IgnoreFirst` property to sets the number of values to hide at the beginning of the indicator. * * ```ts * series.ignoreFirst=2; * ``` */ get ignoreFirst() { return this.i.aa7; } set ignoreFirst(v) { this.i.aa7 = +v; this._a("ignoreFirst", this.i.aa7); } /** * Scrolls the series to display the item for the specified data item. * The series is scrolled by the minimum amount required to place the specified data item within * the central 80% of the visible axis. * @param item * The data item (item) to scroll to. * * Use the `ScrollIntoView` method to scrolls the series to display the item for the specified data item. */ scrollIntoView(item) { let iv = this.i.ge(item); return (iv); } } IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent = null; return IgcFinancialOverlayComponent; })();