durationChart.tsx 914 B

1234567891011121314151617181920212223242526272829303132
  1. import {Series} from 'sentry/types/echarts';
  2. import {DurationAggregateSelector} from 'sentry/views/performance/database/durationAggregateSelector';
  3. import {CHART_HEIGHT} from 'sentry/views/performance/database/settings';
  4. import {AVG_COLOR} from 'sentry/views/starfish/colours';
  5. import Chart from 'sentry/views/starfish/components/chart';
  6. import ChartPanel from 'sentry/views/starfish/components/chartPanel';
  7. interface Props {
  8. isLoading: boolean;
  9. series: Series;
  10. }
  11. export function DurationChart({series, isLoading}: Props) {
  12. return (
  13. <ChartPanel title={<DurationAggregateSelector />}>
  14. <Chart
  15. height={CHART_HEIGHT}
  16. grid={{
  17. left: '0',
  18. right: '0',
  19. top: '8px',
  20. bottom: '0',
  21. }}
  22. data={[series]}
  23. loading={isLoading}
  24. utc={false}
  25. chartColors={[AVG_COLOR]}
  26. isLineChart
  27. />
  28. </ChartPanel>
  29. );
  30. }