stackedBarChart.stories.js 948 B

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