index.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Waterfall = void 0;
  4. var tslib_1 = require("tslib");
  5. var plot_1 = require("../../core/plot");
  6. var adaptor_1 = require("./adaptor");
  7. var constant_1 = require("./constant");
  8. var utils_1 = require("./utils");
  9. /**
  10. * 瀑布图
  11. */
  12. var Waterfall = /** @class */ (function (_super) {
  13. tslib_1.__extends(Waterfall, _super);
  14. function Waterfall() {
  15. var _this = _super !== null && _super.apply(this, arguments) || this;
  16. /** 图表类型 */
  17. _this.type = 'waterfall';
  18. return _this;
  19. }
  20. /**
  21. * 获取 瀑布图 默认配置项
  22. * 供外部使用
  23. */
  24. Waterfall.getDefaultOptions = function () {
  25. return constant_1.DEFAULT_OPTIONS;
  26. };
  27. /**
  28. * @override
  29. * @param data
  30. */
  31. Waterfall.prototype.changeData = function (data) {
  32. var _a = this.options, xField = _a.xField, yField = _a.yField, total = _a.total;
  33. this.updateOption({ data: data });
  34. this.chart.changeData((0, utils_1.transformData)(data, xField, yField, total));
  35. };
  36. /**
  37. * 获取 瀑布图 的适配器
  38. */
  39. Waterfall.prototype.getSchemaAdaptor = function () {
  40. return adaptor_1.adaptor;
  41. };
  42. /**
  43. * 获取 瀑布图 的默认配置
  44. */
  45. Waterfall.prototype.getDefaultOptions = function () {
  46. return Waterfall.getDefaultOptions();
  47. };
  48. return Waterfall;
  49. }(plot_1.Plot));
  50. exports.Waterfall = Waterfall;
  51. //# sourceMappingURL=index.js.map