performance.tsx 818 B

12345678910111213141516171819202122232425
  1. import getBreakpointChartOptionsFromData, {
  2. type EventBreakpointChartData,
  3. } from 'sentry/components/events/eventStatisticalDetector/breakpointChartOptions';
  4. import {lightTheme as theme} from 'sentry/utils/theme';
  5. import {slackChartDefaults, slackChartSize} from './slack';
  6. import type {RenderDescriptor} from './types';
  7. import {ChartType} from './types';
  8. export const performanceCharts: RenderDescriptor<ChartType>[] = [];
  9. performanceCharts.push({
  10. key: ChartType.SLACK_PERFORMANCE_ENDPOINT_REGRESSION,
  11. getOption: (data: EventBreakpointChartData) => {
  12. const {chartOptions, series} = getBreakpointChartOptionsFromData(data, theme);
  13. return {
  14. ...chartOptions,
  15. backgroundColor: theme.background,
  16. series: series,
  17. grid: slackChartDefaults.grid,
  18. };
  19. },
  20. ...slackChartSize,
  21. });