Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions static/app/components/charts/barChartZoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
EChartFinishedHandler,
ECharts,
} from 'sentry/types/echarts';
import {browserHistory} from 'sentry/utils/browserHistory';
import {useNavigate} from 'sentry/utils/useNavigate';

type RenderProps = {
dataZoom: ReturnType<typeof DataZoomInside>;
Expand Down Expand Up @@ -81,6 +81,8 @@ export function BarChartZoom({
paramStart,
xAxisIndex,
}: Props) {
const navigate = useNavigate();

/**
* Enable zoom immediately instead of having to toggle to zoom
*/
Expand Down Expand Up @@ -127,7 +129,7 @@ export function BarChartZoom({
if (onHistoryPush) {
onHistoryPush(start, end);
} else {
browserHistory.push(target);
navigate(target);
}
} else {
// Dispatch the restore action here to stop ECharts from zooming
Expand Down
Loading