| 12345678910111213141516171819202122232425 |
- import { baseAnnotationChannels, basePreInference, basePostInference, } from './utils';
- export const LineY = () => {
- return (index, scale, value, coordinate) => {
- const { y: Y } = value;
- const P = Array.from(index, (i) => {
- const p1 = [0, Y[i]];
- const p2 = [1, Y[i]];
- return [p1, p2].map((d) => coordinate.map(d));
- });
- return [index, P];
- };
- };
- const shapes = ['line'];
- LineY.props = {
- defaultShape: 'line',
- defaultLabelShape: 'label',
- composite: false,
- channels: [
- ...baseAnnotationChannels({ shapes }),
- { name: 'y', required: true },
- ],
- preInference: [...basePreInference(), { type: 'maybeTupleY' }],
- postInference: [...basePostInference()],
- };
- //# sourceMappingURL=lineY.js.map
|