Skip to content

Commit

Permalink
[APM] Bug: Set minimum scale to 1% for the Transaction error rate cha…
Browse files Browse the repository at this point in the history
…rt (#77861) (#77876)
  • Loading branch information
cauemarcondes authored Sep 18, 2020
1 parent 5d3bc83 commit eac51a8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui';
import theme from '@elastic/eui/dist/eui_theme_light.json';
import { i18n } from '@kbn/i18n';
import { max } from 'lodash';
import React, { useCallback } from 'react';
import { useParams } from 'react-router-dom';
import { asPercent } from '../../../../../common/utils/formatters';
Expand Down Expand Up @@ -56,6 +57,7 @@ export function ErroneousTransactionsRateChart() {
);

const errorRates = data?.erroneousTransactionsRate || [];
const maxRate = max(errorRates.map((errorRate) => errorRate.y));

return (
<EuiPanel>
Expand All @@ -70,7 +72,7 @@ export function ErroneousTransactionsRateChart() {
<CustomPlot
{...syncedChartsProps}
noHits={data?.noHits}
yMax={1}
yMax={maxRate === 0 ? 1 : undefined}
series={[
{
color: theme.euiColorVis7,
Expand Down

0 comments on commit eac51a8

Please sign in to comment.