scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
84 lines (83 loc) • 3.72 kB
JavaScript
"use strict";
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.BoxPlotSeriesInfo = void 0;
var SeriesInfo_1 = require("./SeriesInfo");
var BoxPlotSeriesInfo = /** @class */ (function (_super) {
__extends(BoxPlotSeriesInfo, _super);
function BoxPlotSeriesInfo(renderableSeries, hitTestInfo) {
var _this = this;
var _a;
_this = _super.call(this, renderableSeries, hitTestInfo) || this;
if (((_a = hitTestInfo.yValues) === null || _a === void 0 ? void 0 : _a.length) === 5) {
_this.max = hitTestInfo.yValues[0];
_this.upper = hitTestInfo.yValues[1];
_this.median = hitTestInfo.yValues[2];
_this.lower = hitTestInfo.yValues[3];
_this.minimum = hitTestInfo.yValues[4];
}
return _this;
}
Object.defineProperty(BoxPlotSeriesInfo.prototype, "formattedMaxValue", {
get: function () {
return this.getYCursorFormattedValue(this.max);
},
enumerable: false,
configurable: true
});
Object.defineProperty(BoxPlotSeriesInfo.prototype, "formattedUpperValue", {
get: function () {
return this.getYCursorFormattedValue(this.upper);
},
enumerable: false,
configurable: true
});
Object.defineProperty(BoxPlotSeriesInfo.prototype, "formattedMedianValue", {
get: function () {
return this.getYCursorFormattedValue(this.median);
},
enumerable: false,
configurable: true
});
Object.defineProperty(BoxPlotSeriesInfo.prototype, "formattedLowerValue", {
get: function () {
return this.getYCursorFormattedValue(this.lower);
},
enumerable: false,
configurable: true
});
Object.defineProperty(BoxPlotSeriesInfo.prototype, "formattedMinimumValue", {
get: function () {
return this.getYCursorFormattedValue(this.minimum);
},
enumerable: false,
configurable: true
});
BoxPlotSeriesInfo.prototype.getValuesWithLabels = function (title, xLabel, yLabel, isXYGrouped) {
var res = _super.prototype.getValuesWithLabels.call(this, title, xLabel, yLabel, isXYGrouped);
if (xLabel)
res.push(this.concatValueWithLabel(this.formattedXValue, xLabel));
res.push(this.concatValueWithLabel(this.formattedMaxValue, "Max"));
res.push(this.concatValueWithLabel(this.formattedUpperValue, "Upper"));
res.push(this.concatValueWithLabel(this.formattedMedianValue, "Median"));
res.push(this.concatValueWithLabel(this.formattedLowerValue, "Lower"));
res.push(this.concatValueWithLabel(this.formattedMinimumValue, "Minimum"));
return res;
};
return BoxPlotSeriesInfo;
}(SeriesInfo_1.SeriesInfo));
exports.BoxPlotSeriesInfo = BoxPlotSeriesInfo;