index.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { __extends } from "tslib";
  2. import { Plot } from '../../core/plot';
  3. import { adaptor, meta } from './adaptor';
  4. import { DEFAULT_OPTIONS } from './constants';
  5. import './interactions';
  6. var Line = /** @class */ (function (_super) {
  7. __extends(Line, _super);
  8. function Line() {
  9. var _this = _super !== null && _super.apply(this, arguments) || this;
  10. /** 图表类型 */
  11. _this.type = 'line';
  12. return _this;
  13. }
  14. /**
  15. * 获取 折线图 默认配置项
  16. * 供外部使用
  17. */
  18. Line.getDefaultOptions = function () {
  19. return DEFAULT_OPTIONS;
  20. };
  21. /**
  22. * @override
  23. * @param data
  24. */
  25. Line.prototype.changeData = function (data) {
  26. this.updateOption({ data: data });
  27. var _a = this, chart = _a.chart, options = _a.options;
  28. meta({ chart: chart, options: options });
  29. this.chart.changeData(data);
  30. };
  31. /**
  32. * 获取 折线图 默认配置
  33. */
  34. Line.prototype.getDefaultOptions = function () {
  35. return Line.getDefaultOptions();
  36. };
  37. /**
  38. * 获取 折线图 的适配器
  39. */
  40. Line.prototype.getSchemaAdaptor = function () {
  41. return adaptor;
  42. };
  43. return Line;
  44. }(Plot));
  45. export { Line };
  46. //# sourceMappingURL=index.js.map