path.js 903 B

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Path = void 0;
  4. const utils_1 = require("./utils");
  5. /**
  6. * Draw a path.
  7. */
  8. const Path = (options) => {
  9. return (index, scale, value, coordinate) => {
  10. // The points is meaning less for path mark,
  11. // because the position of path shapes specified
  12. // by the d option. So set [0, 0] for render pipeline.
  13. return [index, index.map(() => [[0, 0]])];
  14. };
  15. };
  16. exports.Path = Path;
  17. const shapes = ['path', 'hollow'];
  18. exports.Path.props = {
  19. defaultShape: 'path',
  20. defaultLabelShape: 'label',
  21. composite: false,
  22. channels: [
  23. ...(0, utils_1.baseGeometryChannels)({ shapes }),
  24. { name: 'd', scale: 'identity' },
  25. ],
  26. preInference: [...(0, utils_1.basePreInference)()],
  27. postInference: [...(0, utils_1.basePostInference)()],
  28. };
  29. //# sourceMappingURL=path.js.map