index.js 1.2 KB

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