From 3134426c5b3b531db3a3f08d40406084ef143eed Mon Sep 17 00:00:00 2001 From: Edward Gou Date: Thu, 4 Nov 2021 10:35:47 -0400 Subject: [PATCH 1/2] disabled bar chart animation --- static/app/components/charts/barChart.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/static/app/components/charts/barChart.tsx b/static/app/components/charts/barChart.tsx index 8c77037254f7d6..b62704158da6ad 100644 --- a/static/app/components/charts/barChart.tsx +++ b/static/app/components/charts/barChart.tsx @@ -33,6 +33,7 @@ class BarChart extends React.Component { } return {value: [name, value], itemStyle}; }), + animation: false, ...options, }) )} From d3ed6d92c7d448eb56a487a4b8bf15a6335802de Mon Sep 17 00:00:00 2001 From: Edward Gou Date: Thu, 4 Nov 2021 10:45:38 -0400 Subject: [PATCH 2/2] update to just affect discover --- static/app/components/charts/barChart.tsx | 5 +++-- static/app/components/charts/eventsChart.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/static/app/components/charts/barChart.tsx b/static/app/components/charts/barChart.tsx index b62704158da6ad..954bca3700972f 100644 --- a/static/app/components/charts/barChart.tsx +++ b/static/app/components/charts/barChart.tsx @@ -13,11 +13,12 @@ export type BarChartSeries = Series & Omit & { series: BarChartSeries[]; stacked?: boolean; + animation?: boolean; }; class BarChart extends React.Component { render() { - const {series, stacked, xAxis, ...props} = this.props; + const {series, stacked, xAxis, animation, ...props} = this.props; return ( { } return {value: [name, value], itemStyle}; }), - animation: false, + animation, ...options, }) )} diff --git a/static/app/components/charts/eventsChart.tsx b/static/app/components/charts/eventsChart.tsx index b469ba1d5c793f..a6c3841e6fe8fa 100644 --- a/static/app/components/charts/eventsChart.tsx +++ b/static/app/components/charts/eventsChart.tsx @@ -295,6 +295,7 @@ class Chart extends React.Component { }, }, ...(chartOptionsProp ?? {}), + animation: typeof Component === typeof BarChart ? false : undefined, }; return (