igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
649 lines (642 loc) • 23.5 kB
JavaScript
import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { IgcNumericAngleAxisComponent } from "./igc-numeric-angle-axis-component";
import { IgcNumericRadiusAxisComponent } from "./igc-numeric-radius-axis-component";
import { TrendLineType_$type } from "igniteui-webcomponents-core";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { IgcAssigningPolarStyleEventArgs } from "./igc-assigning-polar-style-event-args";
import { IgcAssigningPolarMarkerStyleEventArgs } from "./igc-assigning-polar-marker-style-event-args";
import { IgcMarkerSeriesComponent } from "./igc-marker-series-component";
import { getAllPropertyNames, toSpinal, ensureBool, ensureEnum, enumToString, brushToString, stringToBrush, toDoubleCollection, fromDoubleCollection, doubleCollectionToString, toPoint, fromPoint } from "igniteui-webcomponents-core";
/**
* Represents the base class from which all IgxDataChartComponent polar series are derived.
*/
var IgcPolarBaseComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcPolarBaseComponent, _super);
function IgcPolarBaseComponent() {
var _this = _super.call(this) || 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(IgcPolarBaseComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcPolarBaseComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
};
IgcPolarBaseComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcPolarBaseComponent, "observedAttributes", {
get: function () {
if (IgcPolarBaseComponent._observedAttributesIgcPolarBaseComponent == null) {
var names = getAllPropertyNames(IgcPolarBaseComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcPolarBaseComponent._observedAttributesIgcPolarBaseComponent = names;
}
return IgcPolarBaseComponent._observedAttributesIgcPolarBaseComponent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "isPolar", {
/**
* Checks if this series is a polar series
*/
get: function () {
return this.i.fq;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "angleMemberPath", {
/**
* Gets or sets the path to use to find the angle values for the series.
*/
get: function () {
return this.i.aao;
},
set: function (v) {
this.i.aao = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "radiusMemberPath", {
/**
* Gets or sets the path to use to get the radius values for the series.
*/
get: function () {
return this.i.aa6;
},
set: function (v) {
this.i.aa6 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "highlightedRadiusMemberPath", {
/**
* Gets or sets the highlighted radius value mapping property for the current series object.
*/
get: function () {
return this.i.aat;
},
set: function (v) {
this.i.aat = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "highlightedAngleMemberPath", {
/**
* Gets or sets the highlighted angle value mapping property for the current series object.
*/
get: function () {
return this.i.aar;
},
set: function (v) {
this.i.aar = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "angleAxis", {
/**
* Gets the effective angle axis for the current series object.
*/
get: function () {
var r = this.i.yy;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgcNumericAngleAxisComponent._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.yy = null : this.i.yy = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.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(IgcPolarBaseComponent.prototype, "radiusAxis", {
/**
* Gets the effective radius axis for the current series object.
*/
get: function () {
var r = this.i.yz;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgcNumericRadiusAxisComponent._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.yz = null : this.i.yz = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.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(IgcPolarBaseComponent.prototype, "useCartesianInterpolation", {
/**
* Gets or sets whether Cartesian Interpolation should be used rather than Archimedian
* spiral based interpolation.
*/
get: function () {
return this.i.z4;
},
set: function (v) {
this.i.z4 = ensureBool(v);
this._a("useCartesianInterpolation", this.i.z4);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.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.aae;
},
set: function (v) {
this.i.aae = +v;
this._a("maximumMarkers", this.i.aae);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "trendLineType", {
/**
* Gets or sets the trend type for the current series object.
*/
get: function () {
return this.i.zg;
},
set: function (v) {
this.i.zg = ensureEnum(TrendLineType_$type, v);
this._a("trendLineType", enumToString(TrendLineType_$type, this.i.zg));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.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.acd);
},
set: function (v) {
this.i.acd = stringToBrush(v);
this._a("trendLineBrush", brushToString(this.i.acd));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "actualTrendLineBrush", {
/**
* Gets the effective TrendLineBrush for this series.
*/
get: function () {
return brushToString(this.i.acc);
},
set: function (v) {
this.i.acc = stringToBrush(v);
this._a("actualTrendLineBrush", brushToString(this.i.acc));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "trendLineThickness", {
/**
* Gets or sets the thickness of the current series object's trend line.
*/
get: function () {
return this.i.aac;
},
set: function (v) {
this.i.aac = +v;
this._a("trendLineThickness", this.i.aac);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.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.ace);
},
set: function (v) {
this.i.ace = toDoubleCollection(v);
this._a("trendLineDashArray", doubleCollectionToString(this.i.ace));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "trendLinePeriod", {
/**
* Gets or sets the moving average period for the current series object.
*/
get: function () {
return this.i.aaf;
},
set: function (v) {
this.i.aaf = +v;
this._a("trendLinePeriod", this.i.aaf);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "trendLineZIndex", {
/**
* Sets or Gets the Trendline Z index.
*/
get: function () {
return this.i.aag;
},
set: function (v) {
this.i.aag = +v;
this._a("trendLineZIndex", this.i.aag);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.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.zu;
},
set: function (v) {
this.i.zu = ensureBool(v);
this._a("clipSeriesToBounds", this.i.zu);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "actualItemSearchMode", {
get: function () {
return this.i.zc;
},
set: function (v) {
this.i.zc = ensureEnum(ScatterItemSearchMode_$type, v);
this._a("actualItemSearchMode", enumToString(ScatterItemSearchMode_$type, this.i.zc));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "itemSearchMode", {
/**
* Gets or sets the mode the series will use to find the closest point to the cursor.
*/
get: function () {
return this.i.ze;
},
set: function (v) {
this.i.ze = ensureEnum(ScatterItemSearchMode_$type, v);
this._a("itemSearchMode", enumToString(ScatterItemSearchMode_$type, this.i.ze));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "itemSearchThreshold", {
/**
* Gets or sets the threshold to use when searching for items using ItemSearchMode.
*/
get: function () {
return this.i.aad;
},
set: function (v) {
this.i.aad = +v;
this._a("itemSearchThreshold", this.i.aad);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "isCustomPolarStyleAllowed", {
/**
* Gets or sets whether this Polar series should allow custom style overrides of its individual visuals.
*/
get: function () {
return this.i.zx;
},
set: function (v) {
this.i.zx = ensureBool(v);
this._a("isCustomPolarStyleAllowed", this.i.zx);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "isCustomPolarMarkerStyleAllowed", {
/**
* Gets or sets whether this Polar series should allow custom style overrides of its individual marker visuals.
*/
get: function () {
return this.i.zw;
},
set: function (v) {
this.i.zw = ensureBool(v);
this._a("isCustomPolarMarkerStyleAllowed", this.i.zw);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "radiusMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' radius value in the Data Legend.
*/
get: function () {
return this.i.aa2;
},
set: function (v) {
this.i.aa2 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "angleMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' angle value in the Data Legend.
*/
get: function () {
return this.i.aak;
},
set: function (v) {
this.i.aak = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "radiusMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' radius value in the Data Legend.
*/
get: function () {
return this.i.aa4;
},
set: function (v) {
this.i.aa4 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPolarBaseComponent.prototype, "angleMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' angle value in the Data Legend.
*/
get: function () {
return this.i.aam;
},
set: function (v) {
this.i.aam = v;
},
enumerable: false,
configurable: true
});
IgcPolarBaseComponent.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];
}
}
};
IgcPolarBaseComponent.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;
};
IgcPolarBaseComponent.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.
*/
IgcPolarBaseComponent.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.
*/
IgcPolarBaseComponent.prototype.getItem = function (world) {
var iv = this.i.ko(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.
*/
IgcPolarBaseComponent.prototype.getItemIndex = function (world) {
var iv = this.i.j4(toPoint(world));
return (iv);
};
IgcPolarBaseComponent.prototype.getExactItemIndex = function (world) {
var iv = this.i.is(toPoint(world));
return (iv);
};
IgcPolarBaseComponent.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
var iv = this.i.wh(toPoint(world), useInterpolation, skipUnknowns);
return fromPoint(iv);
};
IgcPolarBaseComponent.prototype.getItemValue = function (item, memberPathName) {
var iv = this.i.kr(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
*/
IgcPolarBaseComponent.prototype.getMemberPathValue = function (memberPathName) {
var iv = this.i.mf(memberPathName);
return (iv);
};
/**
* Determine if object can be used as RadiusAxis
* @param axis * The object to check
*/
IgcPolarBaseComponent.prototype.canUseAsRadiusAxis = function (axis) {
var iv = this.i.zt(axis);
return (iv);
};
/**
* Determine if object can be used as AngleAxis
* @param axis * The object to check
*/
IgcPolarBaseComponent.prototype.canUseAsAngleAxis = function (axis) {
var iv = this.i.zs(axis);
return (iv);
};
Object.defineProperty(IgcPolarBaseComponent.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 IgcAssigningPolarStyleEventArgs();
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(IgcPolarBaseComponent.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 IgcAssigningPolarMarkerStyleEventArgs();
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
});
IgcPolarBaseComponent._observedAttributesIgcPolarBaseComponent = null;
return IgcPolarBaseComponent;
}(IgcMarkerSeriesComponent));
export { IgcPolarBaseComponent };