index.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Line = 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. require("./interactions");
  9. var Line = /** @class */ (function (_super) {
  10. tslib_1.__extends(Line, _super);
  11. function Line() {
  12. var _this = _super !== null && _super.apply(this, arguments) || this;
  13. /** 图表类型 */
  14. _this.type = 'line';
  15. return _this;
  16. }
  17. /**
  18. * 获取 折线图 默认配置项
  19. * 供外部使用
  20. */
  21. Line.getDefaultOptions = function () {
  22. return constants_1.DEFAULT_OPTIONS;
  23. };
  24. /**
  25. * @override
  26. * @param data
  27. */
  28. Line.prototype.changeData = function (data) {
  29. this.updateOption({ data: data });
  30. var _a = this, chart = _a.chart, options = _a.options;
  31. (0, adaptor_1.meta)({ chart: chart, options: options });
  32. this.chart.changeData(data);
  33. };
  34. /**
  35. * 获取 折线图 默认配置
  36. */
  37. Line.prototype.getDefaultOptions = function () {
  38. return Line.getDefaultOptions();
  39. };
  40. /**
  41. * 获取 折线图 的适配器
  42. */
  43. Line.prototype.getSchemaAdaptor = function () {
  44. return adaptor_1.adaptor;
  45. };
  46. return Line;
  47. }(plot_1.Plot));
  48. exports.Line = Line;
  49. //# sourceMappingURL=index.js.map