scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
100 lines (99 loc) • 4.21 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.XyNPointSeriesResampled = void 0;
var DeletableEntity_1 = require("../../../Core/DeletableEntity");
var ValueName_1 = require("../../../types/ValueName");
var IDataSeries_1 = require("../IDataSeries");
var XyPointSeriesResampled_1 = require("./XyPointSeriesResampled");
var XyNPointSeriesResampled = /** @class */ (function (_super) {
__extends(XyNPointSeriesResampled, _super);
function XyNPointSeriesResampled(wasmContext, xRange, arrayCount, valueNames) {
if (arrayCount === void 0) { arrayCount = 1; }
var _this = _super.call(this) || this;
_this.type = IDataSeries_1.EDataSeriesType.XyN;
_this.subSeries = [];
_this.arrayCount = 1;
_this.resampled = true;
_this.wasmContext = wasmContext;
_this.arrayCount = arrayCount;
_this.valueNames = valueNames !== null && valueNames !== void 0 ? valueNames : (0, ValueName_1.generateValueNamesForDataSeries)(_this.arrayCount);
for (var i = 0; i < _this.arrayCount; i++) {
_this.subSeries.push(new XyPointSeriesResampled_1.XyPointSeriesResampled(wasmContext, xRange, _this.valueNames[i]));
}
_this.xRange = xRange;
return _this;
}
Object.defineProperty(XyNPointSeriesResampled.prototype, "intIndexes", {
get: function () {
return this.subSeries[0].intIndexes;
},
enumerable: false,
configurable: true
});
Object.defineProperty(XyNPointSeriesResampled.prototype, "indexes", {
get: function () {
return this.subSeries[0].indexes;
},
enumerable: false,
configurable: true
});
Object.defineProperty(XyNPointSeriesResampled.prototype, "xValues", {
get: function () {
return this.subSeries[0].xValues;
},
enumerable: false,
configurable: true
});
Object.defineProperty(XyNPointSeriesResampled.prototype, "count", {
get: function () {
return this.subSeries[0].xValues.size();
},
enumerable: false,
configurable: true
});
Object.defineProperty(XyNPointSeriesResampled.prototype, "yValues", {
get: function () {
return this.subSeries[0].yValues;
},
enumerable: false,
configurable: true
});
XyNPointSeriesResampled.prototype.getYValues = function (i) {
return this.subSeries[0].getYValues(i);
};
XyNPointSeriesResampled.prototype.getYValuesByName = function (name) {
return this.subSeries[0].getYValuesByName(name);
};
XyNPointSeriesResampled.prototype.getSubSeriesByName = function (name) {
var index = this.valueNames.indexOf(name);
if (index >= 0) {
return this.subSeries[index];
}
else {
return undefined;
}
};
XyNPointSeriesResampled.prototype.delete = function () {
this.subSeries.forEach(function (sub) { return sub.delete(); });
this.subSeries.length = 0;
this.wasmContext = undefined;
};
XyNPointSeriesResampled.prototype.clearIntIndexes = function () { };
return XyNPointSeriesResampled;
}(DeletableEntity_1.DeletableEntity));
exports.XyNPointSeriesResampled = XyNPointSeriesResampled;