mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Uptime] Improve ping chart axis (#77992)
This commit is contained in:
parent
ed7a630710
commit
d3dd50520b
2 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { LineSeries, CurveType } from '@elastic/charts';
|
||||
import { LineSeries, CurveType, Fit } from '@elastic/charts';
|
||||
import { LocationDurationLine } from '../../../../common/types';
|
||||
import { convertMicrosecondsToMilliseconds as microsToMillis } from '../../../lib/helper';
|
||||
|
||||
|
@ -28,6 +28,7 @@ export const DurationLineSeriesList = ({ lines }: Props) => (
|
|||
yAccessors={[1]}
|
||||
yScaleToDataExtent={false}
|
||||
yScaleType="linear"
|
||||
fit={Fit.Linear}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
|
|
|
@ -17,6 +17,7 @@ import { EuiTitle, EuiSpacer } from '@elastic/eui';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import React, { useContext } from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import numeral from '@elastic/numeral';
|
||||
import moment from 'moment';
|
||||
import { getChartDateLabel } from '../../../lib/helper';
|
||||
import { ChartWrapper } from './chart_wrapper';
|
||||
|
@ -144,6 +145,8 @@ export const PingHistogramComponent: React.FC<PingHistogramComponentProps> = ({
|
|||
defaultMessage: 'Ping Y Axis',
|
||||
})}
|
||||
position="left"
|
||||
tickFormat={(d) => numeral(d).format('0')}
|
||||
labelFormat={(d) => numeral(d).format('0a')}
|
||||
title={i18n.translate('xpack.uptime.snapshotHistogram.yAxis.title', {
|
||||
defaultMessage: 'Pings',
|
||||
description:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue