import {useTheme} from '@emotion/react'; import {AreaChart} from 'sentry/components/charts/areaChart'; import {axisLabelFormatter, getDurationUnit} from 'sentry/utils/discover/charts'; import getDuration from 'sentry/utils/duration/getDuration'; type Props = React.ComponentPropsWithoutRef; function Chart(props: Props) { const theme = useTheme(); const durationUnit = getDurationUnit(props.series); return ( axisLabelFormatter(value, 'duration', undefined, durationUnit), }, }} tooltip={{valueFormatter: value => getDuration(value / 1000, 2)}} {...props} /> ); } export default Chart;