Fix graph area to invert at 0

This commit is contained in:
Marshall Polaris 2022-10-04 14:12:53 -07:00
parent bbce3e873e
commit 0258b29cb9

View File

@ -277,7 +277,7 @@ export const SingleValueHistoryChart = <P extends HistoryPoint>(props: {
const xScale = viewXScale ?? props.xScale const xScale = viewXScale ?? props.xScale
const px = useCallback((p: P) => xScale(p.x), [xScale]) const px = useCallback((p: P) => xScale(p.x), [xScale])
const py0 = yScale(yScale.domain()[0]) const py0 = yScale(0)
const py1 = useCallback((p: P) => yScale(p.y), [yScale]) const py1 = useCallback((p: P) => yScale(p.y), [yScale])
const { xAxis, yAxis } = useMemo(() => { const { xAxis, yAxis } = useMemo(() => {