UNPKG

@visactor/openinula-vchart

Version:

The openinula version of VChart 4.x

16 lines (12 loc) 504 B
import React from "openinula"; const ChartContext = React.createContext(null); ChartContext.displayName = "ChartContext"; export function withChartInstance(Component) { const Com = React.forwardRef(((props, ref) => React.createElement(ChartContext.Consumer, null, (ctx => React.createElement(Component, Object.assign({ ref: ref, chart: ctx.chart }, props)))))); return Com.displayName = Component.name, Com; } export default ChartContext; //# sourceMappingURL=chart.js.map