igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
596 lines (589 loc) • 20.4 kB
JavaScript
import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { IgrNumericAngleAxis } from "./igr-numeric-angle-axis";
import { IgrNumericRadiusAxis } from "./igr-numeric-radius-axis";
import { TrendLineType_$type } from "igniteui-react-core";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { IgrAssigningPolarStyleEventArgs } from "./igr-assigning-polar-style-event-args";
import { IgrAssigningPolarMarkerStyleEventArgs } from "./igr-assigning-polar-marker-style-event-args";
import { IgrMarkerSeries } from "./igr-marker-series";
import { ensureBool, ensureEnum, brushToString, stringToBrush, toDoubleCollection, fromDoubleCollection, toPoint, fromPoint } from "igniteui-react-core";
/**
* Represents the base class from which all IgxDataChartComponent polar series are derived.
*/
var IgrPolarBase = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrPolarBase, _super);
function IgrPolarBase(props) {
var _this = _super.call(this, props) || this;
_this._angleAxisName = null;
_this._radiusAxisName = null;
_this._assigningPolarStyle = null;
_this._assigningPolarStyle_wrapped = null;
_this._assigningPolarMarkerStyle = null;
_this._assigningPolarMarkerStyle_wrapped = null;
return _this;
}
Object.defineProperty(IgrPolarBase.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "isPolar", {
/**
* Checks if this series is a polar series
*/
get: function () {
return this.i.fq;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "angleMemberPath", {
/**
* Gets or sets the path to use to find the angle values for the series.
*/
get: function () {
return this.i.aau;
},
set: function (v) {
this.i.aau = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "radiusMemberPath", {
/**
* Gets or sets the path to use to get the radius values for the series.
*/
get: function () {
return this.i.abc;
},
set: function (v) {
this.i.abc = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "highlightedRadiusMemberPath", {
/**
* Gets or sets the highlighted radius value mapping property for the current series object.
*/
get: function () {
return this.i.aaz;
},
set: function (v) {
this.i.aaz = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "highlightedAngleMemberPath", {
/**
* Gets or sets the highlighted angle value mapping property for the current series object.
*/
get: function () {
return this.i.aax;
},
set: function (v) {
this.i.aax = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "angleAxis", {
/**
* Gets the effective angle axis for the current series object.
*/
get: function () {
var r = this.i.y4;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrNumericAngleAxis._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.y4 = null : this.i.y4 = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "angleAxisName", {
/**
* Gets or sets the name to use to resolve angleAxis from markup.
*/
get: function () {
return this._angleAxisName;
},
set: function (v) {
this._angleAxisName = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "radiusAxis", {
/**
* Gets the effective radius axis for the current series object.
*/
get: function () {
var r = this.i.y5;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrNumericRadiusAxis._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.y5 = null : this.i.y5 = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "radiusAxisName", {
/**
* Gets or sets the name to use to resolve radiusAxis from markup.
*/
get: function () {
return this._radiusAxisName;
},
set: function (v) {
this._radiusAxisName = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "useCartesianInterpolation", {
/**
* Gets or sets whether Cartesian Interpolation should be used rather than Archimedian
* spiral based interpolation.
*/
get: function () {
return this.i.aaa;
},
set: function (v) {
this.i.aaa = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.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.aak;
},
set: function (v) {
this.i.aak = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "trendLineType", {
/**
* Gets or sets the trend type for the current series object.
*/
get: function () {
return this.i.zm;
},
set: function (v) {
this.i.zm = ensureEnum(TrendLineType_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.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.acj);
},
set: function (v) {
this.i.acj = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "actualTrendLineBrush", {
/**
* Gets the effective TrendLineBrush for this series.
*/
get: function () {
return brushToString(this.i.aci);
},
set: function (v) {
this.i.aci = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "trendLineThickness", {
/**
* Gets or sets the thickness of the current series object's trend line.
*/
get: function () {
return this.i.aai;
},
set: function (v) {
this.i.aai = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.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.ack);
},
set: function (v) {
this.i.ack = toDoubleCollection(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "trendLinePeriod", {
/**
* Gets or sets the moving average period for the current series object.
*/
get: function () {
return this.i.aal;
},
set: function (v) {
this.i.aal = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "trendLineZIndex", {
/**
* Sets or Gets the Trendline Z index.
*/
get: function () {
return this.i.aam;
},
set: function (v) {
this.i.aam = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.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.z0;
},
set: function (v) {
this.i.z0 = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "actualItemSearchMode", {
get: function () {
return this.i.zi;
},
set: function (v) {
this.i.zi = ensureEnum(ScatterItemSearchMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "itemSearchMode", {
/**
* Gets or sets the mode the series will use to find the closest point to the cursor.
*/
get: function () {
return this.i.zk;
},
set: function (v) {
this.i.zk = ensureEnum(ScatterItemSearchMode_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "itemSearchThreshold", {
/**
* Gets or sets the threshold to use when searching for items using ItemSearchMode.
*/
get: function () {
return this.i.aaj;
},
set: function (v) {
this.i.aaj = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "isCustomPolarStyleAllowed", {
/**
* Gets or sets whether this Polar series should allow custom style overrides of its individual visuals.
*/
get: function () {
return this.i.z3;
},
set: function (v) {
this.i.z3 = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "isCustomPolarMarkerStyleAllowed", {
/**
* Gets or sets whether this Polar series should allow custom style overrides of its individual marker visuals.
*/
get: function () {
return this.i.z2;
},
set: function (v) {
this.i.z2 = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "radiusMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' radius value in the Data Legend.
*/
get: function () {
return this.i.aa8;
},
set: function (v) {
this.i.aa8 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "angleMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' angle value in the Data Legend.
*/
get: function () {
return this.i.aaq;
},
set: function (v) {
this.i.aaq = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "radiusMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' radius value in the Data Legend.
*/
get: function () {
return this.i.aba;
},
set: function (v) {
this.i.aba = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "angleMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' angle value in the Data Legend.
*/
get: function () {
return this.i.aas;
},
set: function (v) {
this.i.aas = v;
},
enumerable: false,
configurable: true
});
IgrPolarBase.prototype.bindAxes = function (axes) {
_super.prototype.bindAxes.call(this, axes);
for (var i = 0; i < axes.length; i++) {
if (this.angleAxisName && this.angleAxisName.length > 0 &&
axes[i].name == this.angleAxisName) {
this.angleAxis = axes[i];
}
}
for (var i = 0; i < axes.length; i++) {
if (this.radiusAxisName && this.radiusAxisName.length > 0 &&
axes[i].name == this.radiusAxisName) {
this.radiusAxis = axes[i];
}
}
};
IgrPolarBase.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;
};
IgrPolarBase.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.
*/
IgrPolarBase.prototype.scrollIntoView = function (item) {
var iv = this.i.ge(item);
return (iv);
};
/**
* Gets the item that is the best match for the specified world coordinates.
* @param world * The world coordinates to use.
*/
IgrPolarBase.prototype.getItem = function (world) {
var iv = this.i.kr(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.
*/
IgrPolarBase.prototype.getItemIndex = function (world) {
var iv = this.i.j7(toPoint(world));
return (iv);
};
IgrPolarBase.prototype.getExactItemIndex = function (world) {
var iv = this.i.it(toPoint(world));
return (iv);
};
IgrPolarBase.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
var iv = this.i.wn(toPoint(world), useInterpolation, skipUnknowns);
return fromPoint(iv);
};
IgrPolarBase.prototype.getItemValue = function (item, memberPathName) {
var iv = this.i.ku(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
*/
IgrPolarBase.prototype.getMemberPathValue = function (memberPathName) {
var iv = this.i.mi(memberPathName);
return (iv);
};
/**
* Determine if object can be used as RadiusAxis
* @param axis * The object to check
*/
IgrPolarBase.prototype.canUseAsRadiusAxis = function (axis) {
var iv = this.i.zz(axis);
return (iv);
};
/**
* Determine if object can be used as AngleAxis
* @param axis * The object to check
*/
IgrPolarBase.prototype.canUseAsAngleAxis = function (axis) {
var iv = this.i.zy(axis);
return (iv);
};
Object.defineProperty(IgrPolarBase.prototype, "assigningPolarStyle", {
/**
* Event raised when Assigning Category Style
*/
get: function () {
return this._assigningPolarStyle;
},
set: function (ev) {
var _this = this;
if (this._assigningPolarStyle_wrapped !== null) {
this.i.assigningPolarStyle = delegateRemove(this.i.assigningPolarStyle, this._assigningPolarStyle_wrapped);
this._assigningPolarStyle_wrapped = null;
this._assigningPolarStyle = null;
}
this._assigningPolarStyle = ev;
this._assigningPolarStyle_wrapped = function (o, e) {
var outerArgs = new IgrAssigningPolarStyleEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeAssigningPolarStyle) {
_this.beforeAssigningPolarStyle(_this, outerArgs);
}
if (_this._assigningPolarStyle) {
_this._assigningPolarStyle(_this, outerArgs);
}
};
this.i.assigningPolarStyle = delegateCombine(this.i.assigningPolarStyle, this._assigningPolarStyle_wrapped);
;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPolarBase.prototype, "assigningPolarMarkerStyle", {
/**
* Event raised when Assigning Polar Marker Style
*/
get: function () {
return this._assigningPolarMarkerStyle;
},
set: function (ev) {
var _this = this;
if (this._assigningPolarMarkerStyle_wrapped !== null) {
this.i.assigningPolarMarkerStyle = delegateRemove(this.i.assigningPolarMarkerStyle, this._assigningPolarMarkerStyle_wrapped);
this._assigningPolarMarkerStyle_wrapped = null;
this._assigningPolarMarkerStyle = null;
}
this._assigningPolarMarkerStyle = ev;
this._assigningPolarMarkerStyle_wrapped = function (o, e) {
var outerArgs = new IgrAssigningPolarMarkerStyleEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeAssigningPolarMarkerStyle) {
_this.beforeAssigningPolarMarkerStyle(_this, outerArgs);
}
if (_this._assigningPolarMarkerStyle) {
_this._assigningPolarMarkerStyle(_this, outerArgs);
}
};
this.i.assigningPolarMarkerStyle = delegateCombine(this.i.assigningPolarMarkerStyle, this._assigningPolarMarkerStyle_wrapped);
;
},
enumerable: false,
configurable: true
});
return IgrPolarBase;
}(IgrMarkerSeries));
export { IgrPolarBase };