bytev-charts
Version:
基于echarts和JavaScript及ES6封装的一个可以直接调用的图表组件库,内置主题设计,简单快捷,且支持用户自定义配置; npm 安装方式: npm install bytev-charts 若启动提示还需额外install插件,则运行 npm install @babel/runtime-corejs2 即可;
134 lines (127 loc) • 3.74 kB
JavaScript
import _classCallCheck from "@babel/runtime-corejs2/helpers/classCallCheck";
import _createClass from "@babel/runtime-corejs2/helpers/createClass";
import _defineProperty from "@babel/runtime-corejs2/helpers/defineProperty";
import ByteVCharts from './ByteVCharts.class.js';
var ByteV = /*#__PURE__*/function () {
function ByteV() {
_classCallCheck(this, ByteV);
}
_createClass(ByteV, null, [{
key: "init",
value: function init(element, componentId, data) {
return this.byteVCharts.init(element, componentId, data);
}
}, {
key: "init3D",
value: function init3D(element, componentId, option) {
return this.byteVCharts.init3D(element, componentId, option);
}
}, {
key: "initTheme",
value: function initTheme(themeId) {
this.byteVCharts.initTheme(themeId);
}
}, {
key: "setTheme",
value: function setTheme(themeId) {
this.byteVCharts.setTheme(themeId);
}
}, {
key: "initScreenSize",
value: function initScreenSize(width, height) {
this.byteVCharts.initScreenSize(width, height);
}
}, {
key: "setScreenSize",
value: function setScreenSize(width, height) {
this.byteVCharts.setScreenSize(width, height);
}
}, {
key: "setChartsRenderer",
value: function setChartsRenderer() {
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'canvas';
this.byteVCharts.chartsRenderer = str;
}
}, {
key: "resize",
value: function resize(themeId) {
this.byteVCharts.resize();
}
}, {
key: "openLoopTooltip",
value: function openLoopTooltip() {
this.byteVCharts.openLoopTooltip();
}
}, {
key: "offLoopTooltip",
value: function offLoopTooltip() {
this.byteVCharts.offLoopTooltip();
}
}, {
key: "playAnimation",
value: function playAnimation() {
this.byteVCharts.playAnimation();
}
}, {
key: "stopAnimation",
value: function stopAnimation() {
this.byteVCharts.stopAnimation();
}
}, {
key: "offAnimation",
value: function offAnimation() {
this.byteVCharts.offAnimation();
}
}, {
key: "getAllComponentInstance",
value: function getAllComponentInstance() {
return this.byteVCharts.allComponentInstanceObj;
}
}, {
key: "getAllInstance",
value: function getAllInstance() {
return this.byteVCharts.allComponentInstanceObj;
}
}, {
key: "getAllObject",
value: function getAllObject() {
return this.byteVCharts.allComponentInstanceObj;
}
}, {
key: "getComponentInstanceByName",
value: function getComponentInstanceByName(name) {
return this.byteVCharts.getComponentInstanceByName(name);
}
}, {
key: "getInstanceByName",
value: function getInstanceByName(name) {
return this.byteVCharts.getComponentInstanceByName(name);
}
}, {
key: "getObjectByName",
value: function getObjectByName(name) {
return this.byteVCharts.getComponentInstanceByName(name);
}
}, {
key: "getComponentInstanceById",
value: function getComponentInstanceById(id) {
return this.byteVCharts.getComponentInstanceById(id);
}
}, {
key: "getInstanceById",
value: function getInstanceById(id) {
return this.byteVCharts.getComponentInstanceById(id);
}
}, {
key: "getObjectById",
value: function getObjectById(id) {
return this.byteVCharts.getComponentInstanceById(id);
}
}]);
return ByteV;
}();
_defineProperty(ByteV, "byteVCharts", new ByteVCharts());
_defineProperty(ByteV, "theme", ByteV.byteVCharts.theme);
_defineProperty(ByteV, "component", ByteV.byteVCharts.component);
export { ByteV as default };
ByteV.initTheme();