constant.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.CLASS_NAMES = exports.NAME_VALUE_RATIO = exports.STEP_RATIO = exports.CONTINUOUS_DEFAULT_OPTIONS = exports.CATEGORY_DEFAULT_OPTIONS = exports.LEGEND_BASE_DEFAULT_OPTIONS = void 0;
  4. var util_1 = require("../../util");
  5. var handle_1 = require("./continuous/handle");
  6. exports.LEGEND_BASE_DEFAULT_OPTIONS = {
  7. showTitle: true,
  8. padding: 0,
  9. orientation: 'horizontal',
  10. backgroundFill: 'transparent',
  11. titleText: '',
  12. titleSpacing: 4,
  13. titlePosition: 'top-left',
  14. titleFill: '#2C3542',
  15. titleFontWeight: 'bold',
  16. titleFontFamily: 'sans-serif',
  17. titleFontSize: 12,
  18. };
  19. exports.CATEGORY_DEFAULT_OPTIONS = (0, util_1.deepAssign)({}, exports.LEGEND_BASE_DEFAULT_OPTIONS, {});
  20. exports.CONTINUOUS_DEFAULT_OPTIONS = (0, util_1.deepAssign)({}, exports.LEGEND_BASE_DEFAULT_OPTIONS, (0, util_1.superStyleProps)(handle_1.DEFAULT_HANDLE_CFG, 'handle'), {
  21. color: [
  22. '#d0e3fa',
  23. '#acc7f6',
  24. '#8daaf2',
  25. '#6d8eea',
  26. '#4d73cd',
  27. '#325bb1',
  28. '#5a3e75',
  29. '#8c3c79',
  30. '#e23455',
  31. '#e7655b',
  32. ],
  33. indicatorBackgroundFill: '#262626',
  34. indicatorLabelFill: 'white',
  35. indicatorLabelFontSize: 12,
  36. indicatorVisibility: 'hidden',
  37. labelAlign: 'value',
  38. labelDirection: 'positive',
  39. labelSpacing: 5,
  40. showHandle: true,
  41. showIndicator: true,
  42. showLabel: true,
  43. slidable: true,
  44. titleText: '',
  45. type: 'continuous',
  46. });
  47. // 连续图例步长比例
  48. exports.STEP_RATIO = 0.01;
  49. // 分类图例name和value宽度比例
  50. exports.NAME_VALUE_RATIO = 0.5;
  51. exports.CLASS_NAMES = (0, util_1.classNames)({
  52. title: 'title',
  53. titleGroup: 'title-group',
  54. items: 'items',
  55. itemsGroup: 'items-group',
  56. contentGroup: 'content-group',
  57. ribbonGroup: 'ribbon-group',
  58. ribbon: 'ribbon',
  59. handlesGroup: 'handles-group',
  60. handle: 'handle',
  61. startHandle: 'start-handle',
  62. endHandle: 'end-handle',
  63. labelGroup: 'label-group',
  64. label: 'label',
  65. indicator: 'indicator',
  66. }, 'legend');
  67. //# sourceMappingURL=constant.js.map