weex-chart-mobile
Version:
Weex chart - Create chart like line, bar, pie etc for mobiles.
21 lines (20 loc) • 427 B
JavaScript
import GM from 'g2-mobile';
import WxChartElement from './WxChartElement';
let _stack = [];
class WxChart extends GM.Chart {
constructor(config){
this.el = new WxChartElement(config.id);
}
render(){
_stack.push(this);
}
}
WxChart.initiate = () => {
let wx;
if(_stack.length){
while(wx = _stack.shift()){
new WxChart(wx);
}
}
}
export default WxChart;