Files
2024-02-15 17:01:50 +00:00

31 lines
766 B
TypeScript

import type {Location} from 'history';
import OptionSelector from 'sentry/components/charts/optionSelector';
import {t} from 'sentry/locale';
import Histogram from 'sentry/utils/performance/histogram';
import {ZOOM_END, ZOOM_START} from './utils';
type Props = {
location: Location;
};
function ChartControls({location}: Props) {
return (
<Histogram location={location} zoomKeys={[ZOOM_START, ZOOM_END]}>
{({filterOptions, handleFilterChange, activeFilter}) => {
return (
<OptionSelector
title={t('Outliers')}
selected={activeFilter.value}
options={filterOptions}
onChange={handleFilterChange}
/>
);
}}
</Histogram>
);
}
export default ChartControls;