diff --git a/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx index f87be32b43fc1c..3ec72eea197f33 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx @@ -6,7 +6,6 @@ import { EuiTitle } from '@elastic/eui'; import theme from '@elastic/eui/dist/eui_theme_light.json'; import { i18n } from '@kbn/i18n'; -import { mean } from 'lodash'; import React, { useCallback } from 'react'; import { EuiPanel } from '@elastic/eui'; import { useChartsSync } from '../../../../hooks/useChartsSync'; @@ -79,7 +78,7 @@ export const ErroneousTransactionsRateChart = () => { { color: theme.euiColorVis7, data: [], - legendValue: tickFormatY(mean(errorRates.map((rate) => rate.y))), + legendValue: tickFormatY(data?.average), legendClickDisabled: true, title: i18n.translate('xpack.apm.errorRateChart.avgLabel', { defaultMessage: 'Avg.',