echarts
Version:
A powerful charting and visualization library for browser
18 lines (12 loc) • 500 B
JavaScript
;
var zrUtil = require('zrender/lib/core/util');
var echartsAPIList = [
'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchAction', 'isDisposed',
'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption'
];
function ExtensionAPI(chartInstance) {
zrUtil.each(echartsAPIList, function (name) {
this[name] = zrUtil.bind(chartInstance[name], chartInstance);
}, this);
}
module.exports = ExtensionAPI;