import IntervalSelector from 'sentry/components/charts/intervalSelector'; import OptionSelector from 'sentry/components/charts/optionSelector'; import { ChartControls, InlineContainer, SectionHeading, SectionValue, } from 'sentry/components/charts/styles'; import {t} from 'sentry/locale'; import {SelectValue} from 'sentry/types'; import EventView from 'sentry/utils/discover/eventView'; import {TOP_EVENT_MODES} from 'sentry/utils/discover/types'; export const PROCESSED_BASELINE_TOGGLE_KEY = 'show-processed-baseline'; type Props = { displayMode: string; displayOptions: SelectValue[]; eventView: EventView; onAxisChange: (value: string[]) => void; onDisplayChange: (value: string) => void; onIntervalChange: (value: string | undefined) => void; onTopEventsChange: (value: string) => void; topEvents: string; total: number | null; yAxisOptions: SelectValue[]; yAxisValue: string[]; }; export default function ChartFooter({ total, yAxisValue, yAxisOptions, onAxisChange, displayMode, displayOptions, onDisplayChange, onTopEventsChange, onIntervalChange, topEvents, eventView, }: Props) { const elements: React.ReactNode[] = []; elements.push({t('Event Count')}); elements.push( total === null ? ( ) : ( {total.toLocaleString()} ) ); const topEventOptions: SelectValue[] = []; for (let i = 1; i <= 10; i++) { topEventOptions.push({value: i.toString(), label: i.toString()}); } return ( {elements} {TOP_EVENT_MODES.includes(displayMode) && ( )} {TOP_EVENT_MODES.includes(displayMode) ? ( onAxisChange([yAxis])} /> ) : ( 3 ? t('Select up to 3 options') : t('Y-axis') } title={t('Y-Axis')} selected={yAxisValue} options={yAxisOptions} onChange={onAxisChange} /> )} ); }