igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
603 lines (596 loc) • 22.5 kB
JavaScript
import { __extends } from "tslib";
import { EventEmitter, Output, Component, Input } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxNumericAngleAxisComponent } from "./igx-numeric-angle-axis-component";
import { IgxNumericRadiusAxisComponent } from "./igx-numeric-radius-axis-component";
import { TrendLineType_$type } from "igniteui-angular-core";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { IgxAssigningPolarStyleEventArgs } from "./igx-assigning-polar-style-event-args";
import { IgxAssigningPolarMarkerStyleEventArgs } from "./igx-assigning-polar-marker-style-event-args";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { ensureBool, ensureEnum, brushToString, stringToBrush, toDoubleCollection, fromDoubleCollection, toPoint, fromPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
* Represents the base class from which all IgxDataChartComponent polar series are derived.
*/
var IgxPolarBaseComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgxPolarBaseComponent, _super);
function IgxPolarBaseComponent() {
var _this = _super.call(this) || this;
_this._assigningPolarStyle = null;
_this._assigningPolarMarkerStyle = null;
return _this;
}
Object.defineProperty(IgxPolarBaseComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "isPolar", {
/**
* Checks if this series is a polar series
*/
get: function () {
return this.i.fo;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "angleMemberPath", {
/**
* Gets or sets the path to use to find the angle values for the series.
*/
get: function () {
return this.i.aai;
},
set: function (v) {
this.i.aai = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "radiusMemberPath", {
/**
* Gets or sets the path to use to get the radius values for the series.
*/
get: function () {
return this.i.aa0;
},
set: function (v) {
this.i.aa0 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "highlightedRadiusMemberPath", {
/**
* Gets or sets the highlighted radius value mapping property for the current series object.
*/
get: function () {
return this.i.aan;
},
set: function (v) {
this.i.aan = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "highlightedAngleMemberPath", {
/**
* Gets or sets the highlighted angle value mapping property for the current series object.
*/
get: function () {
return this.i.aal;
},
set: function (v) {
this.i.aal = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "angleAxis", {
/**
* Gets the effective angle axis for the current series object.
*/
get: function () {
var r = this.i.ys;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgxNumericAngleAxisComponent._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.ys = null : this.i.ys = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "radiusAxis", {
/**
* Gets the effective radius axis for the current series object.
*/
get: function () {
var r = this.i.yt;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgxNumericRadiusAxisComponent._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.yt = null : this.i.yt = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "useCartesianInterpolation", {
/**
* Gets or sets whether Cartesian Interpolation should be used rather than Archimedian
* spiral based interpolation.
*/
get: function () {
return this.i.zy;
},
set: function (v) {
this.i.zy = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "maximumMarkers", {
/**
* Gets or sets the maximum number of markers displayed by the current series.
* If more than the specified number of markers are visible, the polar series will automatically
* choose a representative set.
*/
get: function () {
return this.i.z8;
},
set: function (v) {
this.i.z8 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "trendLineType", {
/**
* Gets or sets the trend type for the current series object.
*/
get: function () {
return this.i.za;
},
set: function (v) {
this.i.za = ensureEnum(TrendLineType_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "trendLineBrush", {
/**
* Gets or sets the brush that specifies how the current series
* object's trend line is drawn.
*/
get: function () {
return brushToString(this.i.ab7);
},
set: function (v) {
this.i.ab7 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "actualTrendLineBrush", {
/**
* Gets the effective TrendLineBrush for this series.
*/
get: function () {
return brushToString(this.i.ab6);
},
set: function (v) {
this.i.ab6 = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "trendLineThickness", {
/**
* Gets or sets the thickness of the current series object's trend line.
*/
get: function () {
return this.i.z6;
},
set: function (v) {
this.i.z6 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "trendLineDashArray", {
/**
* Gets or sets a collection of double values that indicate the pattern of dashes and gaps that
* is used to draw the trend line for the current series object.
*/
get: function () {
return fromDoubleCollection(this.i.ab8);
},
set: function (v) {
this.i.ab8 = toDoubleCollection(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "trendLinePeriod", {
/**
* Gets or sets the moving average period for the current series object.
*/
get: function () {
return this.i.z9;
},
set: function (v) {
this.i.z9 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "trendLineZIndex", {
/**
* Sets or Gets the Trendline Z index.
*/
get: function () {
return this.i.aaa;
},
set: function (v) {
this.i.aaa = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "clipSeriesToBounds", {
/**
* Gets or sets whether to clip the series to the bounds.
* Setting this to true can effect performance.
*/
get: function () {
return this.i.zo;
},
set: function (v) {
this.i.zo = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "actualItemSearchMode", {
get: function () {
return this.i.y6;
},
set: function (v) {
this.i.y6 = ensureEnum(ScatterItemSearchMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "itemSearchMode", {
/**
* Gets or sets the mode the series will use to find the closest point to the cursor.
*/
get: function () {
return this.i.y8;
},
set: function (v) {
this.i.y8 = ensureEnum(ScatterItemSearchMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "itemSearchThreshold", {
/**
* Gets or sets the threshold to use when searching for items using ItemSearchMode.
*/
get: function () {
return this.i.z7;
},
set: function (v) {
this.i.z7 = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "isCustomPolarStyleAllowed", {
/**
* Gets or sets whether this Polar series should allow custom style overrides of its individual visuals.
*/
get: function () {
return this.i.zr;
},
set: function (v) {
this.i.zr = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "isCustomPolarMarkerStyleAllowed", {
/**
* Gets or sets whether this Polar series should allow custom style overrides of its individual marker visuals.
*/
get: function () {
return this.i.zq;
},
set: function (v) {
this.i.zq = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "radiusMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' radius value in the Data Legend.
*/
get: function () {
return this.i.aaw;
},
set: function (v) {
this.i.aaw = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "angleMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' angle value in the Data Legend.
*/
get: function () {
return this.i.aae;
},
set: function (v) {
this.i.aae = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "radiusMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' radius value in the Data Legend.
*/
get: function () {
return this.i.aay;
},
set: function (v) {
this.i.aay = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "angleMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' angle value in the Data Legend.
*/
get: function () {
return this.i.aag;
},
set: function (v) {
this.i.aag = v;
},
enumerable: false,
configurable: true
});
IgxPolarBaseComponent.prototype.findByName = function (name) {
var baseResult = _super.prototype.findByName.call(this, name);
if (baseResult) {
return baseResult;
}
if (this.angleAxis && this.angleAxis.name && this.angleAxis.name == name) {
return this.angleAxis;
}
if (this.radiusAxis && this.radiusAxis.name && this.radiusAxis.name == name) {
return this.radiusAxis;
}
return null;
};
IgxPolarBaseComponent.prototype._styling = function (container, component, parent) {
_super.prototype._styling.call(this, container, component, parent);
this._inStyling = true;
if (this.angleAxis && this.angleAxis._styling) {
this.angleAxis._styling(container, component, this);
}
if (this.radiusAxis && this.radiusAxis._styling) {
this.radiusAxis._styling(container, component, this);
}
this._inStyling = false;
};
/**
* Scrolls the requested item into view, if possible.
* @param item * The item to scroll into view.
*/
IgxPolarBaseComponent.prototype.scrollIntoView = function (item) {
var iv = this.i.gc(item);
return (iv);
};
/**
* Gets the item that is the best match for the specified world coordinates.
* @param world * The world coordinates to use.
*/
IgxPolarBaseComponent.prototype.getItem = function (world) {
var iv = this.i.km(toPoint(world));
return (iv);
};
/**
* Gets the index of the item that resides at the provided world coordinates.
* @param world * The world coordinates of the requested item.
*/
IgxPolarBaseComponent.prototype.getItemIndex = function (world) {
var iv = this.i.j2(toPoint(world));
return (iv);
};
IgxPolarBaseComponent.prototype.getExactItemIndex = function (world) {
var iv = this.i.iq(toPoint(world));
return (iv);
};
IgxPolarBaseComponent.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
var iv = this.i.wb(toPoint(world), useInterpolation, skipUnknowns);
return fromPoint(iv);
};
IgxPolarBaseComponent.prototype.getItemValue = function (item, memberPathName) {
var iv = this.i.kp(item, memberPathName);
return (iv);
};
/**
* Gets the value of a requested member path from the series.
* @param memberPathName * The property name of a valid member path for the series
*/
IgxPolarBaseComponent.prototype.getMemberPathValue = function (memberPathName) {
var iv = this.i.mc(memberPathName);
return (iv);
};
/**
* Determine if object can be used as RadiusAxis
* @param axis * The object to check
*/
IgxPolarBaseComponent.prototype.canUseAsRadiusAxis = function (axis) {
var iv = this.i.zn(axis);
return (iv);
};
/**
* Determine if object can be used as AngleAxis
* @param axis * The object to check
*/
IgxPolarBaseComponent.prototype.canUseAsAngleAxis = function (axis) {
var iv = this.i.zm(axis);
return (iv);
};
Object.defineProperty(IgxPolarBaseComponent.prototype, "assigningPolarStyle", {
/**
* Event raised when Assigning Category Style
*/
get: function () {
var _this = this;
if (this._assigningPolarStyle == null) {
this._assigningPolarStyle = new EventEmitter();
this.i.assigningPolarStyle = delegateCombine(this.i.assigningPolarStyle, function (o, e) {
var outerArgs = new IgxAssigningPolarStyleEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeAssigningPolarStyle) {
_this.beforeAssigningPolarStyle(_this, outerArgs);
}
_this._assigningPolarStyle.emit({
sender: _this,
args: outerArgs
});
});
}
return this._assigningPolarStyle;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxPolarBaseComponent.prototype, "assigningPolarMarkerStyle", {
/**
* Event raised when Assigning Polar Marker Style
*/
get: function () {
var _this = this;
if (this._assigningPolarMarkerStyle == null) {
this._assigningPolarMarkerStyle = new EventEmitter();
this.i.assigningPolarMarkerStyle = delegateCombine(this.i.assigningPolarMarkerStyle, function (o, e) {
var outerArgs = new IgxAssigningPolarMarkerStyleEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeAssigningPolarMarkerStyle) {
_this.beforeAssigningPolarMarkerStyle(_this, outerArgs);
}
_this._assigningPolarMarkerStyle.emit({
sender: _this,
args: outerArgs
});
});
}
return this._assigningPolarMarkerStyle;
},
enumerable: false,
configurable: true
});
IgxPolarBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxPolarBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxPolarBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxPolarBaseComponent, selector: "ng-component", inputs: { angleMemberPath: "angleMemberPath", radiusMemberPath: "radiusMemberPath", highlightedRadiusMemberPath: "highlightedRadiusMemberPath", highlightedAngleMemberPath: "highlightedAngleMemberPath", angleAxis: "angleAxis", radiusAxis: "radiusAxis", useCartesianInterpolation: "useCartesianInterpolation", maximumMarkers: "maximumMarkers", trendLineType: "trendLineType", trendLineBrush: "trendLineBrush", actualTrendLineBrush: "actualTrendLineBrush", trendLineThickness: "trendLineThickness", trendLineDashArray: "trendLineDashArray", trendLinePeriod: "trendLinePeriod", trendLineZIndex: "trendLineZIndex", clipSeriesToBounds: "clipSeriesToBounds", actualItemSearchMode: "actualItemSearchMode", itemSearchMode: "itemSearchMode", itemSearchThreshold: "itemSearchThreshold", isCustomPolarStyleAllowed: "isCustomPolarStyleAllowed", isCustomPolarMarkerStyleAllowed: "isCustomPolarMarkerStyleAllowed", radiusMemberAsLegendLabel: "radiusMemberAsLegendLabel", angleMemberAsLegendLabel: "angleMemberAsLegendLabel", radiusMemberAsLegendUnit: "radiusMemberAsLegendUnit", angleMemberAsLegendUnit: "angleMemberAsLegendUnit" }, outputs: { assigningPolarStyle: "assigningPolarStyle", assigningPolarMarkerStyle: "assigningPolarMarkerStyle" }, usesInheritance: true, ngImport: i0, template: "", isInline: true });
return IgxPolarBaseComponent;
}(IgxMarkerSeriesComponent));
export { IgxPolarBaseComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxPolarBaseComponent, decorators: [{
type: Component,
args: [{
template: "",
}]
}], ctorParameters: function () { return []; }, propDecorators: { angleMemberPath: [{
type: Input
}], radiusMemberPath: [{
type: Input
}], highlightedRadiusMemberPath: [{
type: Input
}], highlightedAngleMemberPath: [{
type: Input
}], angleAxis: [{
type: Input
}], radiusAxis: [{
type: Input
}], useCartesianInterpolation: [{
type: Input
}], maximumMarkers: [{
type: Input
}], trendLineType: [{
type: Input
}], trendLineBrush: [{
type: Input
}], actualTrendLineBrush: [{
type: Input
}], trendLineThickness: [{
type: Input
}], trendLineDashArray: [{
type: Input
}], trendLinePeriod: [{
type: Input
}], trendLineZIndex: [{
type: Input
}], clipSeriesToBounds: [{
type: Input
}], actualItemSearchMode: [{
type: Input
}], itemSearchMode: [{
type: Input
}], itemSearchThreshold: [{
type: Input
}], isCustomPolarStyleAllowed: [{
type: Input
}], isCustomPolarMarkerStyleAllowed: [{
type: Input
}], radiusMemberAsLegendLabel: [{
type: Input
}], angleMemberAsLegendLabel: [{
type: Input
}], radiusMemberAsLegendUnit: [{
type: Input
}], angleMemberAsLegendUnit: [{
type: Input
}], assigningPolarStyle: [{
type: Output
}], assigningPolarMarkerStyle: [{
type: Output
}] } });