constants.js 1022 B

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