Skip to content

Commit

Permalink
[APM] Average for transaction error rate includes null values (#74345)
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes authored and APM User committed Aug 5, 2020
1 parent eadea24 commit b4340a4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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.',
Expand Down

0 comments on commit b4340a4

Please sign in to comment.