igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
438 lines (432 loc) • 16.8 kB
JavaScript
import { __extends } from "tslib";
import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component";
import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component";
import { IgxProgressiveLoadStatusEventArgs } from "./igx-progressive-load-status-event-args";
import { IgxSeriesComponent } from "./igx-series-component";
import { HighDensityScatterSeries } from "./HighDensityScatterSeries";
import { ensureBool, colorToString, stringToColor, toPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
* Represents a IgxDataChartComponent series where a high volume of scatter points can be displayed.
*/
var IgxHighDensityScatterSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgxHighDensityScatterSeriesComponent, _super);
function IgxHighDensityScatterSeriesComponent() {
var _this = _super.call(this) || this;
_this._progressiveLoadStatusChanged = null;
return _this;
}
IgxHighDensityScatterSeriesComponent.prototype.createImplementation = function () {
return new HighDensityScatterSeries();
};
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "isPixel", {
/**
* Gets whether the current series shows pixels.
*/
get: function () {
return this.i.fp;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "isScatter", {
/**
* Checks if this series is a scatter series
*/
get: function () {
return this.i.fx;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xAxis", {
/**
* Gets or sets the effective x-axis for the current object.
*/
get: function () {
var r = this.i.xa;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgxNumericXAxisComponent._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.xa = null : this.i.xa = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yAxis", {
/**
* Gets or sets the effective y-axis for the current object.
*/
get: function () {
var r = this.i.xc;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgxNumericYAxisComponent._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.xc = null : this.i.xc = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xMemberPath", {
/**
* Gets or sets the x value mapping property for the current series object.
*/
get: function () {
return this.i.ze;
},
set: function (v) {
this.i.ze = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series X value in the Data Legend.
*/
get: function () {
return this.i.za;
},
set: function (v) {
this.i.za = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series Y value in the Data Legend.
*/
get: function () {
return this.i.zi;
},
set: function (v) {
this.i.zi = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "xMemberAsLegendUnit", {
/**
* Gets or sets the unit after displayed after series X value in the Data Legend.
*/
get: function () {
return this.i.zc;
},
set: function (v) {
this.i.zc = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yMemberAsLegendUnit", {
/**
* Gets or sets the unit after displayed after series Y value in the Data Legend.
*/
get: function () {
return this.i.zk;
},
set: function (v) {
this.i.zk = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "yMemberPath", {
/**
* Gets or sets the y value mapping property for the current series object.
*/
get: function () {
return this.i.zm;
},
set: function (v) {
this.i.zm = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "useBruteForce", {
/**
* Gets or sets the whether to use use brute force mode.
*/
get: function () {
return this.i.xr;
},
set: function (v) {
this.i.xr = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "progressiveLoad", {
/**
* Gets or sets the whether to progressively load the data into the chart.
*/
get: function () {
return this.i.xq;
},
set: function (v) {
this.i.xq = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMinimum", {
/**
* Gets or sets the density value that maps to the minimum heat color.
*/
get: function () {
return this.i.ym;
},
set: function (v) {
this.i.ym = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMaximum", {
/**
* Gets or sets the value that maps to the maximum heat color.
*/
get: function () {
return this.i.yl;
},
set: function (v) {
this.i.yl = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMinimumColor", {
/**
* Gets or sets the color to use for the minimum end of the scale.
*/
get: function () {
return colorToString(this.i.aak);
},
set: function (v) {
this.i.aak = stringToColor(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "heatMaximumColor", {
/**
* Gets or sets the color to use for the maximum end of the scale.
*/
get: function () {
return colorToString(this.i.aaj);
},
set: function (v) {
this.i.aaj = stringToColor(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "pointExtent", {
/**
* Gets or sets the the pixel extent of the square data points that are rendered.
*/
get: function () {
return this.i.yy;
},
set: function (v) {
this.i.yy = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "progressiveStatus", {
/**
* Represents the current status of the progressive load of the series. It will range from 0 to 100, where 100 is fully loaded.
*/
get: function () {
return this.i.yz;
},
set: function (v) {
this.i.yz = +v;
},
enumerable: false,
configurable: true
});
IgxHighDensityScatterSeriesComponent.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;
};
IgxHighDensityScatterSeriesComponent.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;
};
IgxHighDensityScatterSeriesComponent.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
*/
IgxHighDensityScatterSeriesComponent.prototype.getMemberPathValue = function (memberPathName) {
var iv = this.i.mf(memberPathName);
return (iv);
};
/**
* Determine if object can be used as YAxis
* @param axis * The object to check
*/
IgxHighDensityScatterSeriesComponent.prototype.canUseAsYAxis = function (axis) {
var iv = this.i.xp(axis);
return (iv);
};
/**
* Determine if object can be used as XAxis
* @param axis * The object to check
*/
IgxHighDensityScatterSeriesComponent.prototype.canUseAsXAxis = function (axis) {
var iv = this.i.xo(axis);
return (iv);
};
/**
* Scrolls the series to display the item for the specified data item.
* The series is scrolled by the minimum amount required to place the specified data item within
* the central 80% of the visible axis.
* @param item * The data item (item) to scroll to.
*/
IgxHighDensityScatterSeriesComponent.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.
*/
IgxHighDensityScatterSeriesComponent.prototype.getItem = function (world) {
var iv = this.i.ko(toPoint(world));
return (iv);
};
Object.defineProperty(IgxHighDensityScatterSeriesComponent.prototype, "progressiveLoadStatusChanged", {
/**
* Raised when the progressive loading state of the series has changed.
*/
get: function () {
var _this = this;
if (this._progressiveLoadStatusChanged == null) {
this._progressiveLoadStatusChanged = new EventEmitter();
this.i.progressiveLoadStatusChanged = delegateCombine(this.i.progressiveLoadStatusChanged, function (o, e) {
_this._runInZone(function () {
var outerArgs = new IgxProgressiveLoadStatusEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeProgressiveLoadStatusChanged) {
_this.beforeProgressiveLoadStatusChanged(_this, outerArgs);
}
_this._progressiveLoadStatusChanged.emit({
sender: _this,
args: outerArgs
});
});
});
}
return this._progressiveLoadStatusChanged;
},
enumerable: false,
configurable: true
});
IgxHighDensityScatterSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxHighDensityScatterSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxHighDensityScatterSeriesComponent, selector: "igx-high-density-scatter-series", inputs: { xAxis: "xAxis", yAxis: "yAxis", xMemberPath: "xMemberPath", xMemberAsLegendLabel: "xMemberAsLegendLabel", yMemberAsLegendLabel: "yMemberAsLegendLabel", xMemberAsLegendUnit: "xMemberAsLegendUnit", yMemberAsLegendUnit: "yMemberAsLegendUnit", yMemberPath: "yMemberPath", useBruteForce: "useBruteForce", progressiveLoad: "progressiveLoad", heatMinimum: "heatMinimum", heatMaximum: "heatMaximum", heatMinimumColor: "heatMinimumColor", heatMaximumColor: "heatMaximumColor", pointExtent: "pointExtent", progressiveStatus: "progressiveStatus" }, outputs: { progressiveLoadStatusChanged: "progressiveLoadStatusChanged" }, providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxHighDensityScatterSeriesComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxHighDensityScatterSeriesComponent;
}(IgxSeriesComponent));
export { IgxHighDensityScatterSeriesComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHighDensityScatterSeriesComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-high-density-scatter-series',
template: "",
providers: [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxHighDensityScatterSeriesComponent; }) }],
changeDetection: ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { xAxis: [{
type: Input
}], yAxis: [{
type: Input
}], xMemberPath: [{
type: Input
}], xMemberAsLegendLabel: [{
type: Input
}], yMemberAsLegendLabel: [{
type: Input
}], xMemberAsLegendUnit: [{
type: Input
}], yMemberAsLegendUnit: [{
type: Input
}], yMemberPath: [{
type: Input
}], useBruteForce: [{
type: Input
}], progressiveLoad: [{
type: Input
}], heatMinimum: [{
type: Input
}], heatMaximum: [{
type: Input
}], heatMinimumColor: [{
type: Input
}], heatMaximumColor: [{
type: Input
}], pointExtent: [{
type: Input
}], progressiveStatus: [{
type: Input
}], progressiveLoadStatusChanged: [{
type: Output
}] } });