index.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 { getTinyData } from './utils';
  6. var TinyLine = /** @class */ (function (_super) {
  7. __extends(TinyLine, _super);
  8. function TinyLine() {
  9. var _this = _super !== null && _super.apply(this, arguments) || this;
  10. /** 图表类型 */
  11. _this.type = 'tiny-line';
  12. return _this;
  13. }
  14. /**
  15. * 获取默认配置项
  16. * 供外部使用
  17. */
  18. TinyLine.getDefaultOptions = function () {
  19. return DEFAULT_OPTIONS;
  20. };
  21. /**
  22. * @override
  23. * @param data
  24. */
  25. TinyLine.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. chart.changeData(getTinyData(data));
  30. };
  31. TinyLine.prototype.getDefaultOptions = function () {
  32. return TinyLine.getDefaultOptions();
  33. };
  34. /**
  35. * 获取 迷你折线图 的适配器
  36. */
  37. TinyLine.prototype.getSchemaAdaptor = function () {
  38. return adaptor;
  39. };
  40. return TinyLine;
  41. }(Plot));
  42. export { TinyLine };
  43. //# sourceMappingURL=index.js.map