charts-breakdownBars.stories.js 699 B

1234567891011121314151617181920212223242526272829303132
  1. import BreakdownBars from 'sentry/components/charts/breakdownBars';
  2. export default {
  3. title: 'Components/Data Visualization/Charts/Breakdown Bars',
  4. component: BreakdownBars,
  5. parameters: {
  6. controls: {hideNoControlsWarning: true},
  7. },
  8. };
  9. export const Default = () => {
  10. const data = [
  11. {label: 'unknown', value: 910},
  12. {label: 'not_found', value: 40},
  13. {label: 'data_loss', value: 30},
  14. {label: 'cancelled', value: 20},
  15. ];
  16. return (
  17. <div className="section">
  18. <BreakdownBars data={data} />
  19. </div>
  20. );
  21. };
  22. Default.storyName = 'Breakdown Bars';
  23. Default.parameters = {
  24. docs: {
  25. description: {
  26. story: 'Horizontal bar chart with labels',
  27. },
  28. },
  29. };