@attivio/suit
Version:
Attivio SUIT, the Search UI Toolkit, is a library for creating search clients for searching the Attivio platform.
34 lines (23 loc) • 893 B
JavaScript
;
exports.__esModule = true;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* A single point of data in a time-based series.
*/
var DataPoint = function () {
function DataPoint(startTime, endTime, data) {
_classCallCheck(this, DataPoint);
this.startTime = startTime;
this.endTime = endTime;
this.data = data;
}
DataPoint.fromJson = function fromJson(json) {
return new DataPoint(json.startTime || 0, json.endTime || 0, json.data || 0);
};
/** The start of the range the data point covers. */
/** The end of the range the data point covers. */
/** The value of the data point. If there is no data for this time, this will be null. */
return DataPoint;
}();
exports.default = DataPoint;
module.exports = exports["default"];