constants.js 825 B

12345678910111213141516171819202122232425262728293031
  1. import { __assign } from "tslib";
  2. import { get } from '@antv/util';
  3. export var X_FIELD = 'x';
  4. export var Y_FIELD = 'y';
  5. export var DEFAULT_TOOLTIP_OPTIONS = {
  6. showTitle: false,
  7. shared: true,
  8. showMarkers: false,
  9. customContent: function (x, data) { return "".concat(get(data, [0, 'data', 'y'], 0)); },
  10. containerTpl: '<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',
  11. itemTpl: '<span>{value}</span>',
  12. domStyles: {
  13. 'g2-tooltip': {
  14. padding: '2px 4px',
  15. fontSize: '10px',
  16. },
  17. },
  18. showCrosshairs: true,
  19. crosshairs: {
  20. type: 'x',
  21. },
  22. };
  23. /**
  24. * 默认配置项
  25. */
  26. export var DEFAULT_OPTIONS = {
  27. appendPadding: 2,
  28. tooltip: __assign({}, DEFAULT_TOOLTIP_OPTIONS),
  29. animation: {},
  30. };
  31. //# sourceMappingURL=constants.js.map