igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
494 lines (488 loc) • 18.2 kB
JavaScript
import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { IgcNumericXAxisComponent } from "./igc-numeric-x-axis-component";
import { IgcNumericYAxisComponent } from "./igc-numeric-y-axis-component";
import { IgcProgressiveLoadStatusEventArgs } from "./igc-progressive-load-status-event-args";
import { IgcSeriesComponent } from "./igc-series-component";
import { HighDensityScatterSeries } from "./HighDensityScatterSeries";
import { getAllPropertyNames, toSpinal, ensureBool, colorToString, stringToColor, toPoint } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent series where a high volume of scatter points can be displayed.
*/
var IgcHighDensityScatterSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcHighDensityScatterSeriesComponent, _super);
function IgcHighDensityScatterSeriesComponent() {
var _this = _super.call(this) || this;
_this._xAxisName = null;
_this._yAxisName = null;
_this._progressiveLoadStatusChanged = null;
_this._progressiveLoadStatusChanged_wrapped = null;
return _this;
}
IgcHighDensityScatterSeriesComponent.prototype.createImplementation = function () {
return new HighDensityScatterSeries();
};
Object.defineProperty(IgcHighDensityScatterSeriesComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcHighDensityScatterSeriesComponent.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();
}
};
IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent, "observedAttributes", {
get: function () {
if (IgcHighDensityScatterSeriesComponent._observedAttributesIgcHighDensityScatterSeriesComponent == null) {
var names = getAllPropertyNames(IgcHighDensityScatterSeriesComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcHighDensityScatterSeriesComponent._observedAttributesIgcHighDensityScatterSeriesComponent = names;
}
return IgcHighDensityScatterSeriesComponent._observedAttributesIgcHighDensityScatterSeriesComponent;
},
enumerable: false,
configurable: true
});
IgcHighDensityScatterSeriesComponent.register = function () {
if (!IgcHighDensityScatterSeriesComponent._isElementRegistered) {
IgcHighDensityScatterSeriesComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcHighDensityScatterSeriesComponent.htmlTagName, IgcHighDensityScatterSeriesComponent);
}
};
Object.defineProperty(IgcHighDensityScatterSeriesComponent.prototype, "isPixel", {
/**
* Gets whether the current series shows pixels.
*/
get: function () {
return this.i.fp;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.prototype, "isScatter", {
/**
* Checks if this series is a scatter series
*/
get: function () {
return this.i.fx;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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 = IgcNumericXAxisComponent._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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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 = IgcNumericYAxisComponent._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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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(IgcHighDensityScatterSeriesComponent.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);
this._a("useBruteForce", this.i.xr);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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);
this._a("progressiveLoad", this.i.xq);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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;
this._a("heatMinimum", this.i.ym);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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;
this._a("heatMaximum", this.i.yl);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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);
this._a("heatMinimumColor", colorToString(this.i.aak));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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);
this._a("heatMaximumColor", colorToString(this.i.aaj));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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;
this._a("pointExtent", this.i.yy);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHighDensityScatterSeriesComponent.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;
this._a("progressiveStatus", this.i.yz);
},
enumerable: false,
configurable: true
});
IgcHighDensityScatterSeriesComponent.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];
}
}
};
IgcHighDensityScatterSeriesComponent.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;
};
IgcHighDensityScatterSeriesComponent.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;
};
IgcHighDensityScatterSeriesComponent.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
*/
IgcHighDensityScatterSeriesComponent.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
*/
IgcHighDensityScatterSeriesComponent.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
*/
IgcHighDensityScatterSeriesComponent.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.
*/
IgcHighDensityScatterSeriesComponent.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.
*/
IgcHighDensityScatterSeriesComponent.prototype.getItem = function (world) {
var iv = this.i.ko(toPoint(world));
return (iv);
};
Object.defineProperty(IgcHighDensityScatterSeriesComponent.prototype, "progressiveLoadStatusChanged", {
/**
* Raised when the progressive loading state of the series has changed.
*/
get: function () {
return this._progressiveLoadStatusChanged;
},
set: function (ev) {
var _this = this;
if (this._progressiveLoadStatusChanged_wrapped !== null) {
this.i.progressiveLoadStatusChanged = delegateRemove(this.i.progressiveLoadStatusChanged, this._progressiveLoadStatusChanged_wrapped);
this._progressiveLoadStatusChanged_wrapped = null;
this._progressiveLoadStatusChanged = null;
}
this._progressiveLoadStatusChanged = ev;
this._progressiveLoadStatusChanged_wrapped = function (o, e) {
var outerArgs = new IgcProgressiveLoadStatusEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeProgressiveLoadStatusChanged) {
_this.beforeProgressiveLoadStatusChanged(_this, outerArgs);
}
if (_this._progressiveLoadStatusChanged) {
_this._progressiveLoadStatusChanged(_this, outerArgs);
}
};
this.i.progressiveLoadStatusChanged = delegateCombine(this.i.progressiveLoadStatusChanged, this._progressiveLoadStatusChanged_wrapped);
;
},
enumerable: false,
configurable: true
});
IgcHighDensityScatterSeriesComponent._observedAttributesIgcHighDensityScatterSeriesComponent = null;
IgcHighDensityScatterSeriesComponent.htmlTagName = "igc-high-density-scatter-series";
IgcHighDensityScatterSeriesComponent._isElementRegistered = false;
return IgcHighDensityScatterSeriesComponent;
}(IgcSeriesComponent));
export { IgcHighDensityScatterSeriesComponent };