durationChart.tsx 894 B

12345678910111213141516171819202122232425262728293031
  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. chartColors={[AVG_COLOR]}
  25. isLineChart
  26. />
  27. </ChartPanel>
  28. );
  29. }