@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
18 lines (17 loc) • 539 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAxisType = void 0;
var lodash_1 = require("lodash");
var fieldAxisMap = {
Time: "time" /* Time */,
long: "value" /* Value */,
string: "category" /* Category */,
double: "value" /* Value */,
bool: "category" /* Category */
};
function getAxisType(fieldType) {
return fieldType
? lodash_1.get(fieldAxisMap, fieldType) || "category" /* Category */
: "category" /* Category */;
}
exports.getAxisType = getAxisType;