kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
38 lines (36 loc) • 3.15 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDefaultTimeFormat = getDefaultTimeFormat;
exports.getFormatValue = void 0;
var _constants = require("@kepler.gl/constants");
// SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
function getDefaultTimeFormat(interval) {
var timeInterval = interval ? _constants.TICK_INTERVALS[interval] : {
interval: 'none'
};
switch ((timeInterval || {}).interval) {
case 'year':
// 2020
return 'YYYY';
case 'month':
case 'week':
case 'day':
return 'L';
case 'hour':
return 'L H A';
case 'minute':
return 'L LT';
case 'millisecond':
return 'L LTS.SSS';
case 'second':
default:
return 'L LTS';
}
}
var getFormatValue = exports.getFormatValue = function getFormatValue(fmt) {
return fmt[_constants.TOOLTIP_KEY];
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY29uc3RhbnRzIiwicmVxdWlyZSIsImdldERlZmF1bHRUaW1lRm9ybWF0IiwiaW50ZXJ2YWwiLCJ0aW1lSW50ZXJ2YWwiLCJUSUNLX0lOVEVSVkFMUyIsImdldEZvcm1hdFZhbHVlIiwiZXhwb3J0cyIsImZtdCIsIlRPT0xUSVBfS0VZIl0sInNvdXJjZXMiOlsiLi4vc3JjL2Zvcm1hdC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogTUlUXG4vLyBDb3B5cmlnaHQgY29udHJpYnV0b3JzIHRvIHRoZSBrZXBsZXIuZ2wgcHJvamVjdFxuXG5pbXBvcnQge1RPT0xUSVBfS0VZLCBUSUNLX0lOVEVSVkFMU30gZnJvbSAnQGtlcGxlci5nbC9jb25zdGFudHMnO1xuaW1wb3J0IHtUaW1lTGFiZWxGb3JtYXR9IGZyb20gJ0BrZXBsZXIuZ2wvdHlwZXMnO1xuXG5leHBvcnQgZnVuY3Rpb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