index.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Progress = void 0;
  4. var tslib_1 = require("tslib");
  5. var plot_1 = require("../../core/plot");
  6. var adaptor_1 = require("./adaptor");
  7. var constants_1 = require("./constants");
  8. var utils_1 = require("./utils");
  9. var Progress = /** @class */ (function (_super) {
  10. tslib_1.__extends(Progress, _super);
  11. function Progress() {
  12. var _this = _super !== null && _super.apply(this, arguments) || this;
  13. /** 图表类型 */
  14. _this.type = 'process';
  15. return _this;
  16. }
  17. /**
  18. * 获取 仪表盘 默认配置项
  19. * 供外部使用
  20. */
  21. Progress.getDefaultOptions = function () {
  22. return constants_1.DEFAULT_OPTIONS;
  23. };
  24. /**
  25. * 更新数据
  26. * @param percent
  27. */
  28. Progress.prototype.changeData = function (percent) {
  29. this.updateOption({ percent: percent });
  30. this.chart.changeData((0, utils_1.getProgressData)(percent));
  31. };
  32. Progress.prototype.getDefaultOptions = function () {
  33. return Progress.getDefaultOptions();
  34. };
  35. /**
  36. * 获取 进度图 的适配器
  37. */
  38. Progress.prototype.getSchemaAdaptor = function () {
  39. return adaptor_1.adaptor;
  40. };
  41. return Progress;
  42. }(plot_1.Plot));
  43. exports.Progress = Progress;
  44. //# sourceMappingURL=index.js.map