index.js 1.2 KB

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