stackedBarChart.stories.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import React from 'react';
  2. import {withInfo} from '@storybook/addon-info';
  3. import StackedBarChart from 'app/components/stackedBarChart';
  4. export default {
  5. title: 'Charts/StackedBarChart (old)',
  6. };
  7. export const _StackedBarChart = withInfo('An older, non ECharts chart')(() => (
  8. <div style={{height: 400}}>
  9. <StackedBarChart
  10. series={[
  11. {
  12. data: [
  13. {x: 1461099600, y: 31734},
  14. {x: 1461103200, y: 36790},
  15. ],
  16. label: 'received',
  17. },
  18. {
  19. data: [
  20. {x: 1461099600, y: 2867},
  21. {x: 1461103200, y: 2742},
  22. ],
  23. label: 'rejected',
  24. },
  25. {
  26. data: [
  27. {x: 1461099600, y: 0},
  28. {x: 1461103200, y: 0},
  29. ],
  30. label: 'blacklisted',
  31. },
  32. ]}
  33. className="standard-barchart"
  34. height="100%"
  35. label="events"
  36. barClasses={['received', 'blacklisted', 'rejected']}
  37. />
  38. </div>
  39. ));
  40. _StackedBarChart.story = {
  41. name: 'StackedBarChart',
  42. };