UNPKG

igniteui-webcomponents-charts

Version:

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

140 lines (139 loc) 5.36 kB
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component"; import { AbsoluteVolumeOscillatorIndicator } from "./AbsoluteVolumeOscillatorIndicator"; import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents a IgxDataChartComponent Absolute Volume Oscillator indicator series. * Default required members: Volume * * You can use the `AbsoluteVolumeOscillatorIndicator` to identify whether volume trands are increasing or decreasing. * * ```html * <igc-data-chart id="chart"> * <igc-category-x-axis * label="label" * name="xAxis"> * </igc-category-x-axis> * <igc-numeric-y-axis * key="yAxis"> * </igc-numeric-y-axis> * <igc-absolute-volume-oscillator-indicator * xAxisName="xAxis" * yAxisName="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close"> * </igc-absolute-volume-oscillator-indicator> * </igc-data-chart> * ``` * * ```ts * let chart = document.getElementById("chart")! as IgcDataChart; * chart.dataSource = this.data; * ``` * * ```ts * let series = new IgcAbsoluteVolumeOscillatorIndicatorComponent(); * series.xAxis = this.xAxis; * series.yAxis = this.yAxis; * series.openMemberPath = "open"; * series.highMemberPath = "high"; * series.lowMemberPath = "low"; * series.closeMemberPath = "close"; * this.chart.series.add(series); * ``` */ export let IgcAbsoluteVolumeOscillatorIndicatorComponent = /*@__PURE__*/ (() => { class IgcAbsoluteVolumeOscillatorIndicatorComponent extends IgcStrategyBasedIndicatorComponent { createImplementation() { return new AbsoluteVolumeOscillatorIndicator(); } /** * @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 (IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent == null) { let names = getAllPropertyNames(IgcAbsoluteVolumeOscillatorIndicatorComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent = names; } return IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent; } static register() { if (!IgcAbsoluteVolumeOscillatorIndicatorComponent._isElementRegistered) { IgcAbsoluteVolumeOscillatorIndicatorComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcAbsoluteVolumeOscillatorIndicatorComponent.htmlTagName, IgcAbsoluteVolumeOscillatorIndicatorComponent); } } /** * Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object. * The typical, and initial, value for short AVO periods is 10. * * You can use the `ShortPeriod` to set the short moving average period. * * ```ts * this.series.shortPeriod = 10; * ``` */ get shortPeriod() { return this.i.shortPeriod; } set shortPeriod(v) { this.i.shortPeriod = +v; this._a("shortPeriod", this.i.shortPeriod); } /** * Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object. * The typical, and initial, value for long AVO periods is 30. * * You can use the `LongPeriod` to set the long moving average period. * * ```ts * this.series.longPeriod = 30; * ``` */ get longPeriod() { return this.i.longPeriod; } set longPeriod(v) { this.i.longPeriod = +v; this._a("longPeriod", this.i.longPeriod); } } IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent = null; IgcAbsoluteVolumeOscillatorIndicatorComponent.htmlTagName = "igc-absolute-volume-oscillator-indicator"; IgcAbsoluteVolumeOscillatorIndicatorComponent._isElementRegistered = false; return IgcAbsoluteVolumeOscillatorIndicatorComponent; })();