index.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import { __extends } from "tslib";
  2. import { Plot } from '../../core/plot';
  3. import { deepAssign } from '../../utils';
  4. import { adaptor } from './adaptor';
  5. import './interactions';
  6. var Radar = /** @class */ (function (_super) {
  7. __extends(Radar, _super);
  8. function Radar() {
  9. var _this = _super !== null && _super.apply(this, arguments) || this;
  10. /** 图表类型 */
  11. _this.type = 'radar';
  12. return _this;
  13. }
  14. /**
  15. * @override
  16. * @param data
  17. */
  18. Radar.prototype.changeData = function (data) {
  19. this.updateOption({ data: data });
  20. this.chart.changeData(data);
  21. };
  22. /**
  23. * 获取 雷达图 默认配置
  24. */
  25. Radar.prototype.getDefaultOptions = function () {
  26. return deepAssign({}, _super.prototype.getDefaultOptions.call(this), {
  27. xAxis: {
  28. label: {
  29. offset: 15,
  30. },
  31. grid: {
  32. line: {
  33. type: 'line',
  34. },
  35. },
  36. },
  37. yAxis: {
  38. grid: {
  39. line: {
  40. type: 'circle',
  41. },
  42. },
  43. },
  44. legend: {
  45. position: 'top',
  46. },
  47. tooltip: {
  48. shared: true,
  49. showCrosshairs: true,
  50. showMarkers: true,
  51. crosshairs: {
  52. type: 'xy',
  53. line: {
  54. style: {
  55. stroke: '#565656',
  56. lineDash: [4],
  57. },
  58. },
  59. follow: true,
  60. },
  61. },
  62. });
  63. };
  64. /**
  65. * 获取 雷达图 的适配器
  66. */
  67. Radar.prototype.getSchemaAdaptor = function () {
  68. return adaptor;
  69. };
  70. return Radar;
  71. }(Plot));
  72. export { Radar };
  73. //# sourceMappingURL=index.js.map