Fix graph area to invert at 0 (#998)

This commit is contained in:
Marshall Polaris 2022-10-04 14:13:53 -07:00 committed by GitHub
parent bbce3e873e
commit d6bb27f97c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(() => {