1d98d5b50cbb943f3f32d25880c453c9b8e2a6dc.svn-base 730 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * echart图表库
  3. *
  4. * @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
  5. * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)
  6. */
  7. define(function (/*require*/) { //chart
  8. var self = {};
  9. var _chartLibrary = {}; //echart图表库
  10. /**
  11. * 定义图形实现
  12. * @param {Object} name
  13. * @param {Object} clazz 图形实现
  14. */
  15. self.define = function (name, clazz) {
  16. _chartLibrary[name] = clazz;
  17. return self;
  18. };
  19. /**
  20. * 获取图形实现
  21. * @param {Object} name
  22. */
  23. self.get = function (name) {
  24. return _chartLibrary[name];
  25. };
  26. return self;
  27. });