stackedBarChart.stories.js 966 B

12345678910111213141516171819202122232425262728293031323334
  1. import React from 'react';
  2. import {storiesOf} from '@storybook/react';
  3. // import {action} from '@storybook/addon-actions';
  4. import {withInfo} from '@storybook/addon-info';
  5. import StackedBarChart from 'sentry-ui/stackedBarChart';
  6. storiesOf('StackedBarChart', module).add(
  7. 'default',
  8. withInfo('')(() => (
  9. <div style={{height: 400}}>
  10. <StackedBarChart
  11. series={[
  12. {
  13. data: [{x: 1461099600, y: 31734}, {x: 1461103200, y: 36790}],
  14. label: 'received',
  15. },
  16. {
  17. data: [{x: 1461099600, y: 2867}, {x: 1461103200, y: 2742}],
  18. label: 'rejected',
  19. },
  20. {
  21. data: [{x: 1461099600, y: 0}, {x: 1461103200, y: 0}],
  22. label: 'blacklisted',
  23. },
  24. ]}
  25. className="dashboard-barchart standard-barchart"
  26. height="100%"
  27. label="events"
  28. barClasses={['received', 'blacklisted', 'rejected']}
  29. />
  30. </div>
  31. ))
  32. );