constant.js 1.2 KB

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