diff --git a/web/components/charts/generic-charts.tsx b/web/components/charts/generic-charts.tsx index 350bdf21..1d9ec6a6 100644 --- a/web/components/charts/generic-charts.tsx +++ b/web/components/charts/generic-charts.tsx @@ -125,7 +125,7 @@ export const SingleValueDistributionChart = (props: { const xAxis = axisBottom(xScale).ticks(w / 100) const yAxis = axisLeft(yScale).tickFormat(fmtY) return { fmtX, fmtY, xAxis, yAxis } - }, [xScale, yScale]) + }, [w, xScale, yScale]) const onSelect = useEvent((ev: D3BrushEvent) => { if (ev.selection) { @@ -218,7 +218,7 @@ export const MultiValueHistoryChart = (props: { : axisLeft(yScale) return { fmtX, fmtY, xAxis, yAxis } - }, [h, pct, xScale, yScale]) + }, [w, h, pct, xScale, yScale]) const series = useMemo(() => { const d3Stack = stack() @@ -331,7 +331,7 @@ export const SingleValueHistoryChart = (props: { ? axisLeft(yScale).tickValues(pctTickValues).tickFormat(fmtY) : axisLeft(yScale) return { fmtX, fmtY, xAxis, yAxis } - }, [h, pct, xScale, yScale]) + }, [w, h, pct, xScale, yScale]) const onSelect = useEvent((ev: D3BrushEvent) => { if (ev.selection) {