utils.tsx 252 B

123456789
  1. import type {Series} from 'sentry/types/echarts';
  2. export const getBucketSize = (series: Series[] | undefined) => {
  3. if (!series || series.length < 2) {
  4. return 0;
  5. }
  6. return Number(series[0].data[1]?.name) - Number(series[0].data[0]?.name);
  7. };