UNPKG

igniteui-react-charts

Version:

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

311 lines (303 loc) 11.2 kB
import { __extends } from "tslib"; import { IgrNumericXAxis } from "./igr-numeric-x-axis"; import { IgrCategoryAxisBase } from "./igr-category-axis-base"; import { IgrRangeCategorySeries } from "./igr-range-category-series"; import { toPoint, fromPoint } from "igniteui-react-core"; /** * Base class for ranged category series with a numeric X-axis and a category Y-axis. */ var IgrVerticalRangeCategorySeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrVerticalRangeCategorySeries, _super); function IgrVerticalRangeCategorySeries(props) { var _this = _super.call(this, props) || this; _this._xAxisName = null; _this._yAxisName = null; return _this; } Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "xAxis", { /** * Gets or sets the effective x-axis for the current CategorySeries object. */ get: function () { var r = this.i.xAxis; if (r == null) { return null; } if (!r.externalObject) { var e = IgrNumericXAxis._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.xAxis = null : this.i.xAxis = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "xAxisName", { /** * Gets or sets the name to use to resolve xAxis from markup. */ get: function () { return this._xAxisName; }, set: function (v) { this._xAxisName = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "yAxis", { /** * Gets or sets the effective y-axis for the current CategorySeries object. */ get: function () { var r = this.i.yAxis; if (r == null) { return null; } if (!r.externalObject) { var e = IgrCategoryAxisBase._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.yAxis = null : this.i.yAxis = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "yAxisName", { /** * Gets or sets the name to use to resolve yAxis from markup. */ get: function () { return this._yAxisName; }, set: function (v) { this._yAxisName = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "isVertical", { /** * Gets whether or not the current series is vertical series */ get: function () { return this.i.isVertical; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "isRange", { /** * Checks if this series is a range series */ get: function () { return this.i.fy; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "lowMemberAsLegendLabel", { /** * Gets or sets the label displayed before series' Low value in the Data Legend. */ get: function () { return this.i.acj; }, set: function (v) { this.i.acj = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "highMemberAsLegendLabel", { /** * Gets or sets the label displayed before series' High value in the Data Legend. */ get: function () { return this.i.acf; }, set: function (v) { this.i.acf = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "lowMemberAsLegendUnit", { /** * Gets or sets the unit displayed after series' Low value in the Data Legend. */ get: function () { return this.i.acl; }, set: function (v) { this.i.acl = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrVerticalRangeCategorySeries.prototype, "highMemberAsLegendUnit", { /** * Gets or sets the unit displayed after series' High value in the Data Legend. */ get: function () { return this.i.ach; }, set: function (v) { this.i.ach = v; }, enumerable: false, configurable: true }); IgrVerticalRangeCategorySeries.prototype.bindAxes = function (axes) { _super.prototype.bindAxes.call(this, axes); for (var i = 0; i < axes.length; i++) { if (this.xAxisName && this.xAxisName.length > 0 && axes[i].name == this.xAxisName) { this.xAxis = axes[i]; } } for (var i = 0; i < axes.length; i++) { if (this.yAxisName && this.yAxisName.length > 0 && axes[i].name == this.yAxisName) { this.yAxis = axes[i]; } } }; IgrVerticalRangeCategorySeries.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.xAxis && this.xAxis.name && this.xAxis.name == name) { return this.xAxis; } if (this.yAxis && this.yAxis.name && this.yAxis.name == name) { return this.yAxis; } return null; }; IgrVerticalRangeCategorySeries.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.xAxis && this.xAxis._styling) { this.xAxis._styling(container, component, this); } if (this.yAxis && this.yAxis._styling) { this.yAxis._styling(container, component, this); } this._inStyling = false; }; /** * Returns the offset value for this series if grouped on a category axis. */ IgrVerticalRangeCategorySeries.prototype.getOffsetValue = function () { var iv = this.i.getOffsetValue(); return (iv); }; /** * Returns the width of the category grouping this series is in. */ IgrVerticalRangeCategorySeries.prototype.getCategoryWidth = function () { var iv = this.i.getCategoryWidth(); return (iv); }; /** * Gets the precise item index using the vertical (Y-based) category axis. * The base implementation uses the horizontal interaction manager which reads world.X; * vertical series must read world.Y instead. */ IgrVerticalRangeCategorySeries.prototype.getExactItemIndex = function (world) { var iv = this.i.i0(toPoint(world)); return (iv); }; /** * Gets the index of the item that resides at the provided world coordinates (vertical orientation). */ IgrVerticalRangeCategorySeries.prototype.getItemIndex = function (world) { var iv = this.i.ke(toPoint(world)); return (iv); }; /** * Gets the item that is the best match for the specified world coordinates (vertical orientation). */ IgrVerticalRangeCategorySeries.prototype.getItem = function (world) { var iv = this.i.ky(toPoint(world)); return (iv); }; IgrVerticalRangeCategorySeries.prototype.getNextOrExactIndex = function (world, skipUnknowns) { var iv = this.i.kj(toPoint(world), skipUnknowns); return (iv); }; IgrVerticalRangeCategorySeries.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) { var iv = this.i.kl(toPoint(world), skipUnknowns); return (iv); }; IgrVerticalRangeCategorySeries.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) { var iv = this.i.jf(toPoint(world), useInterpolation, skipUnknowns); return (iv); }; IgrVerticalRangeCategorySeries.prototype.getSeriesLowValue = function (world, useInterpolation, skipUnknowns) { var iv = this.i.jd(toPoint(world), useInterpolation, skipUnknowns); return (iv); }; IgrVerticalRangeCategorySeries.prototype.getSeriesHighValue = function (world, useInterpolation, skipUnknowns) { var iv = this.i.jb(toPoint(world), useInterpolation, skipUnknowns); return (iv); }; IgrVerticalRangeCategorySeries.prototype.getSeriesHighValuePosition = function (world, useInterpolation, skipUnknowns) { var iv = this.i.wu(toPoint(world), useInterpolation, skipUnknowns); return fromPoint(iv); }; IgrVerticalRangeCategorySeries.prototype.getSeriesLowValuePosition = function (world, useInterpolation, skipUnknowns) { var iv = this.i.ww(toPoint(world), useInterpolation, skipUnknowns); return fromPoint(iv); }; IgrVerticalRangeCategorySeries.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) { var iv = this.i.wy(toPoint(world), useInterpolation, skipUnknowns); return fromPoint(iv); }; /** * Determine if object can be used as YAxis * @param axis * The object to check */ IgrVerticalRangeCategorySeries.prototype.canUseAsYAxis = function (axis) { var iv = this.i.ace(axis); return (iv); }; /** * Determine if object can be used as XAxis * @param axis * The object to check */ IgrVerticalRangeCategorySeries.prototype.canUseAsXAxis = function (axis) { var iv = this.i.acd(axis); return (iv); }; return IgrVerticalRangeCategorySeries; }(IgrRangeCategorySeries)); export { IgrVerticalRangeCategorySeries };