UNPKG

@antv/g2

Version:

the Grammar of Graphics in Javascript

11 lines 219 B
var ctx; /** * 获取 canvas context */ export function getCanvasContext() { if (!ctx) { ctx = document.createElement('canvas').getContext('2d'); } return ctx; } //# sourceMappingURL=context.js.map