UNPKG

igniteui-react-charts

Version:

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

175 lines (174 loc) 6 kB
import { __extends } from "tslib"; import { IgrSeries } from "./igr-series"; import { TrendLineType_$type } from "igniteui-react-core"; import { IgrAnnotationLayer } from "./igr-annotation-layer"; import { TrendLineLayer } from "./TrendLineLayer"; import { ensureEnum } from "igniteui-react-core"; /** * Represents the class of the value overlay. The value overlay is a line or circle representing a value on an axis. */ var IgrTrendLineLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrTrendLineLayer, _super); function IgrTrendLineLayer(props) { return _super.call(this, props) || this; } IgrTrendLineLayer.prototype.createImplementation = function () { return new TrendLineLayer(); }; Object.defineProperty(IgrTrendLineLayer.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "isAnnotationLayer", { get: function () { return this.i.eu; }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "isLineOnly", { get: function () { return this.i.fl; }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "targetSeriesName", { /** * Gets or sets the name of the series to target this annotation to. */ get: function () { return this.i.aah; }, set: function (v) { this.i.aah = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "targetSeries", { /** * Gets or sets the series to target this annotation to. */ get: function () { var r = this.i.aab; if (r == null) { return null; } if (!r.externalObject) { var e = IgrSeries._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.aab = null : this.i.aab = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "actualTargetSeries", { /** * Gets the actual series being targeted by this annotation. */ get: function () { var r = this.i.aaa; if (r == null) { return null; } if (!r.externalObject) { var e = IgrSeries._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.aaa = null : this.i.aaa = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "trendLineType", { /** * Gets or sets the trend type for the current series object. */ get: function () { return this.i.aad; }, set: function (v) { this.i.aad = ensureEnum(TrendLineType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "trendLinePeriod", { /** * Gets or sets the trend line period for the target series. * The typical, and initial, value for trend line period is 7. */ get: function () { return this.i.aae; }, set: function (v) { this.i.aae = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrTrendLineLayer.prototype, "isUsableInLegend", { get: function () { return this.i.isUsableInLegend; }, enumerable: false, configurable: true }); IgrTrendLineLayer.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) { return this.targetSeries; } if (this.actualTargetSeries && this.actualTargetSeries.name && this.actualTargetSeries.name == name) { return this.actualTargetSeries; } return null; }; IgrTrendLineLayer.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.targetSeries && this.targetSeries._styling) { this.targetSeries._styling(container, component, this); } if (this.actualTargetSeries && this.actualTargetSeries._styling) { this.actualTargetSeries._styling(container, component, this); } this._inStyling = false; }; IgrTrendLineLayer.prototype.onApplyTemplate = function () { this.i.ac(); }; IgrTrendLineLayer.prototype.getManagerIdentifier = function () { var iv = this.i.aag(); return (iv); }; return IgrTrendLineLayer; }(IgrAnnotationLayer)); export { IgrTrendLineLayer };