import styled from '@emotion/styled';
import { assert } from 'react-science/ui';
import { useChartData } from '../context/ChartContext.js';
import { useScale2DX, useScale2DY } from './utilities/scale.js';
const SignalLine = styled.line`
opacity: 0.5;
stroke: green;
stroke-width: 2;
`;
interface SignalDeltaLineProps {
delta: number;
axis: 'X' | 'Y';
show: boolean;
}
function SignalDeltaLine(props: SignalDeltaLineProps) {
const { delta, axis, show } = props;
const { xDomain, yDomain } = useChartData();
const scaleX = useScale2DX();
const scaleY = useScale2DY();
if (!show) return null;
if (axis === 'X') {
return (
);
} else {
assert(axis === 'Y');
return (
);
}
}
export default SignalDeltaLine;