constant.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.DEFAULT_OPTIONS = exports.RAW_FIELDS = exports.SUNBURST_PATH_FIELD = exports.SUNBURST_Y_FIELD = exports.SUNBURST_ANCESTOR_FIELD = void 0;
  4. var plot_1 = require("../../core/plot");
  5. var utils_1 = require("../../utils");
  6. var util_1 = require("../../utils/hierarchy/util");
  7. /**
  8. * 祖先节点,非 root 根节点
  9. */
  10. exports.SUNBURST_ANCESTOR_FIELD = 'ancestor-node';
  11. exports.SUNBURST_Y_FIELD = 'value';
  12. exports.SUNBURST_PATH_FIELD = 'path';
  13. /** 默认的源字段 */
  14. exports.RAW_FIELDS = [
  15. exports.SUNBURST_PATH_FIELD,
  16. util_1.NODE_INDEX_FIELD,
  17. util_1.NODE_ANCESTORS_FIELD,
  18. util_1.CHILD_NODE_COUNT,
  19. 'name',
  20. 'depth',
  21. 'height',
  22. ];
  23. /**
  24. * 旭日图 默认配置项
  25. */
  26. exports.DEFAULT_OPTIONS = (0, utils_1.deepAssign)({}, plot_1.Plot.getDefaultOptions(), {
  27. innerRadius: 0,
  28. radius: 0.85,
  29. // 分层配置
  30. hierarchyConfig: {
  31. // 数值字段,默认是 value(可配置)
  32. field: 'value',
  33. },
  34. // 组件
  35. tooltip: {
  36. shared: true,
  37. showMarkers: false,
  38. offset: 20,
  39. showTitle: false,
  40. },
  41. legend: false,
  42. // 样式设置
  43. sunburstStyle: {
  44. lineWidth: 0.5,
  45. stroke: '#FFF',
  46. },
  47. // 默认开启交互
  48. drilldown: { enabled: true },
  49. });
  50. //# sourceMappingURL=constant.js.map