igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
191 lines (186 loc) • 6.68 kB
JavaScript
import { __extends } from "tslib";
import { IgrColorScale } from "./igr-color-scale";
import { IgrScatterTriangulationSeries } from "./igr-scatter-triangulation-series";
import { ScatterAreaSeries } from "./ScatterAreaSeries";
import { toPoint } from "igniteui-react-core";
/**
* Series class which draws a colored 2D surface based on a triangulation of XY data with numeric values assigned to each point.
*/
var IgrScatterAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrScatterAreaSeries, _super);
function IgrScatterAreaSeries(props) {
return _super.call(this, props) || this;
}
IgrScatterAreaSeries.prototype.createImplementation = function () {
return new ScatterAreaSeries();
};
Object.defineProperty(IgrScatterAreaSeries.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrScatterAreaSeries.prototype, "isArea", {
/**
* Gets whether the current series shows an area shape.
*/
get: function () {
return this.i.ew;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrScatterAreaSeries.prototype, "colorScale", {
/**
* Gets or sets ColorScale used to resolve the color values of points in the series.
*/
get: function () {
var r = this.i.y6;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrColorScale._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.y6 = null : this.i.y6 = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrScatterAreaSeries.prototype, "colorMemberPath", {
/**
* Gets or sets the name of the property on each data item containing a numeric value which can be converted to a color by the ColorScale.
*/
get: function () {
return this.i.zi;
},
set: function (v) {
this.i.zi = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrScatterAreaSeries.prototype, "actualColorScale", {
/**
* Gets actual color scale that is set on ColorScale property or default ColorScale
*/
get: function () {
var r = this.i.y5;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrColorScale._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(IgrScatterAreaSeries.prototype, "colorMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series color value in the Data Legend.
*/
get: function () {
return this.i.ze;
},
set: function (v) {
this.i.ze = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrScatterAreaSeries.prototype, "colorMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series color value in the Data Legend.
*/
get: function () {
return this.i.zg;
},
set: function (v) {
this.i.zg = v;
},
enumerable: false,
configurable: true
});
IgrScatterAreaSeries.prototype.findByName = function (name) {
var baseResult = _super.prototype.findByName.call(this, name);
if (baseResult) {
return baseResult;
}
if (this.colorScale && this.colorScale.name && this.colorScale.name == name) {
return this.colorScale;
}
if (this.actualColorScale && this.actualColorScale.name && this.actualColorScale.name == name) {
return this.actualColorScale;
}
return null;
};
IgrScatterAreaSeries.prototype._styling = function (container, component, parent) {
_super.prototype._styling.call(this, container, component, parent);
this._inStyling = true;
if (this.colorScale && this.colorScale._styling) {
this.colorScale._styling(container, component, this);
}
if (this.actualColorScale && this.actualColorScale._styling) {
this.actualColorScale._styling(container, component, this);
}
this._inStyling = false;
};
IgrScatterAreaSeries.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
*/
IgrScatterAreaSeries.prototype.getMemberPathValue = function (memberPathName) {
var iv = this.i.mi(memberPathName);
return (iv);
};
/**
* Gets the item that is the best match for the specified world coordinates.
* @param world * The world coordinates to use.
*/
IgrScatterAreaSeries.prototype.getItem = function (world) {
var iv = this.i.kr(toPoint(world));
return (iv);
};
/**
* Updates ActualColorScale properties when the ColorScale property has changed
*/
IgrScatterAreaSeries.prototype.updateActualColorScale = function () {
this.i.zp();
};
/**
* Attaches an image to the view of this series
*/
IgrScatterAreaSeries.prototype.attachImage = function (image) {
this.i.zm(image);
};
return IgrScatterAreaSeries;
}(IgrScatterTriangulationSeries));
export { IgrScatterAreaSeries };