UNPKG

bytev-charts-beta1.0

Version:

测试版-1.0,版本号为小版本; 基于echarts和JavaScript及ES6封装的一个可以直接调用的图表组件库,内置主题设计,简单快捷,且支持用户自定义配置; npm 安装方式: npm install bytev-charts 若启动提示还需额外install插件,则运行 npm install @babel/runtime-corejs2 即可;

137 lines (110 loc) 3.41 kB
import _classCallCheck from "@babel/runtime-corejs2/helpers/classCallCheck"; import _createClass from "@babel/runtime-corejs2/helpers/createClass"; /* * * */ import Theme from './Theme.class.js'; import CaribbeanBlue from './impl/CaribbeanBlue.class.js'; import BambooGreen from './impl/BambooGreen.class.js'; import CobaltBlue from './impl/CobaltBlue.class.js'; import PeacockGreen from './impl/PeacockGreen.class.js'; import SeaKingGreen from './impl/SeaKingGreen.class.js'; import WaterColor from "./impl/WaterColor.class.js"; import ChitoseGreen from "./impl/ChitoseGreen.class.js"; import CoffeeBrown from "./impl/CoffeeBrown.class.js"; /*人民币配色*/ import RMB1Cents from "./impl/RMB/RMB1Cents.class.js"; import RMB1 from "./impl/RMB/RMB1.class.js"; import RMB5 from "./impl/RMB/RMB5.class.js"; import RMB10 from "./impl/RMB/RMB10.class.js"; import RMB20 from "./impl/RMB/RMB20.class.js"; import RMB50 from "./impl/RMB/RMB50.class.js"; import RMB100 from "./impl/RMB/RMB100.class.js"; /*人民币配色*/ var ThemeFactory = /*#__PURE__*/function () { function ThemeFactory() { _classCallCheck(this, ThemeFactory); } _createClass(ThemeFactory, [{ key: "getTheme", value: function getTheme(themeId) { var theme = null; switch (themeId) { //加勒比蓝 //case Symbol.for('CaribbeanBlue'): case 'CaribbeanBlue': theme = new CaribbeanBlue(); break; //钴蓝色 case 'CobaltBlue': theme = new CobaltBlue(); break; //中国传统色 - 竹绿 case 'BambooGreen': theme = new BambooGreen(); break; //中国传统色 - 法翠/孔雀绿 case 'PeacockGreen': theme = new PeacockGreen(); break; //中国传统色 - 海王绿 case 'SeaKingGreen': theme = new SeaKingGreen(); break; //中国传统色 - 水色 case 'WaterColor': theme = new WaterColor(); break; //中国传统色 - 千岁绿 case 'ChitoseGreen': theme = new ChitoseGreen(); break; //咖啡棕 case 'CoffeeBrown': theme = new CoffeeBrown(); break; /*人民币配色*/ //1角 case 'RMB1Cents': theme = new CoffeeBrown(); break; //1元 case 'RMB1': theme = new RMB1(); break; //5元 case 'RMB5': theme = new RMB5(); break; //10元 case 'RMB10': theme = new RMB10(); break; //20元 case 'RMB20': theme = new RMB20(); break; //50元 case 'RMB50': theme = new RMB50(); break; //100元 case 'RMB100': theme = new RMB100(); break; /*人民币配色*/ //中国传统色 - 加勒比蓝 default: theme = new CaribbeanBlue(); //如果是themeId是数组,则为用户自定义的色值数组,则根据其传入的数组生成 if (themeId && themeId.constructor && themeId.constructor == Array) { theme.color = themeId; theme.updateProperty(); } break; } return theme; } }]); return ThemeFactory; }(); export { ThemeFactory as default };