groupStatusChart.stories.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import styled from '@emotion/styled';
  2. import GroupStatusChart from 'sentry/components/charts/groupStatusChart';
  3. import storyBook from 'sentry/stories/storyBook';
  4. import type {TimeseriesValue} from 'sentry/types';
  5. const stats: ReadonlyArray<TimeseriesValue> = [
  6. [1715554800, 126],
  7. [1715558400, 112],
  8. [1715562000, 126],
  9. [1715565600, 113],
  10. [1715569200, 118],
  11. [1715572800, 87],
  12. [1715576400, 88],
  13. [1715580000, 59],
  14. [1715583600, 54],
  15. [1715587200, 55],
  16. [1715590800, 52],
  17. [1715594400, 48],
  18. [1715598000, 62],
  19. [1715601600, 86],
  20. [1715605200, 100],
  21. [1715608800, 121],
  22. [1715612400, 124],
  23. [1715616000, 129],
  24. [1715619600, 149],
  25. [1715623200, 141],
  26. [1715626800, 132],
  27. [1715630400, 133],
  28. [1715634000, 127],
  29. [1715637600, 82],
  30. ];
  31. export default storyBook(GroupStatusChart, story => {
  32. story('Default', () => {
  33. return (
  34. <GraphContainer>
  35. <GroupStatusChart showMarkLine stats={stats} groupStatus="Escalating" />
  36. </GraphContainer>
  37. );
  38. });
  39. });
  40. const GraphContainer = styled('div')`
  41. display: flex;
  42. justify-content: center;
  43. margin-bottom: 20px;
  44. `;