From f4f588f48e20a12aa859f5fe629593672debd17c Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Fri, 14 Nov 2025 11:26:10 -0800 Subject: [PATCH] fix(aci): Apply chart zoom on automation history Previously set query parameters that didn't seem to do anything. Moved away from deprecated render component. --- .../components/automationStatsChart.tsx | 60 +++++++++---------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/static/app/views/automations/components/automationStatsChart.tsx b/static/app/views/automations/components/automationStatsChart.tsx index f776289ee3b747..a63da166bb8392 100644 --- a/static/app/views/automations/components/automationStatsChart.tsx +++ b/static/app/views/automations/components/automationStatsChart.tsx @@ -1,8 +1,8 @@ import styled from '@emotion/styled'; import {BarChart} from 'sentry/components/charts/barChart'; -import ChartZoom from 'sentry/components/charts/chartZoom'; import {HeaderTitleLegend} from 'sentry/components/charts/styles'; +import {useChartZoom} from 'sentry/components/charts/useChartZoom'; import type {DateTimeObject} from 'sentry/components/charts/utils'; import LoadingError from 'sentry/components/loadingError'; import Panel from 'sentry/components/panels/panel'; @@ -28,6 +28,7 @@ export function AutomationStatsChart({ utc, }: IssueAlertDetailsProps) { const organization = useOrganization(); + const chartZoomProps = useChartZoom({saveOnZoom: true}); const { data: fireHistory, isPending, @@ -59,37 +60,32 @@ export function AutomationStatsChart({ {isPending && } {isError && } {fireHistory && ( - - {zoomRenderProps => ( - ({ - name: automation.date, - value: automation.count, - })) ?? [], - emphasis: { - disabled: true, - }, - }, - ]} - /> - )} - + ({ + name: automation.date, + value: automation.count, + })), + emphasis: { + disabled: true, + }, + animation: false, + }, + ]} + /> )}