path.js 792 B

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