@visactor/vchart
Version:
charts lib based @visactor/VGrammar
17 lines (14 loc) • 575 B
JavaScript
export const isCollectionMark = type => "line" === type || "area" === type;
export const getDatumOfGraphic = g => {
if (!g || !g.context) return null;
const {data: data, markType: markType} = g.context;
return "line" === (type = markType) || "area" === type ? data : null == data ? void 0 : data[0];
var type;
};
export const findMarkGraphic = (rootGroup, target) => {
let g = target;
for (;(null == g ? void 0 : g.parent) && g.parent !== rootGroup; ) if (g = g.parent,
g.context) return g;
return null;
};
//# sourceMappingURL=mark.js.map