UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

26 lines (22 loc) 755 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.indicatorMapper = void 0; const vutils_1 = require("@visactor/vutils"), indicatorMapper = (data, op) => { const {datum: datum, title: title, content: content} = op, mappedData = [], datumResult = datum.call(null); return title.visible && mappedData.push({ type: "title", index: 0, datum: datumResult, spec: title }), (0, vutils_1.array)(content).forEach(((c, i) => { c.visible && mappedData.push({ type: "content", index: i, datum: datumResult, spec: c }); })), mappedData; }; exports.indicatorMapper = indicatorMapper; //# sourceMappingURL=util.js.map