import { TooltipArea } from 'reaviz'; import { StoryFn, Meta } from '@storybook/react'; import { FunnelSeries, FunnelChart, FunnelChartProps, FunnelAxis, FunnelAxisLabel, FunnelAxisLine, FunnelArc } from 'reaviz'; export default { tags: ['snapshot'], title: 'Charts/Funnel Chart', component: FunnelChart, subcomponents: { FunnelArc, FunnelAxis, FunnelAxisLabel, FunnelAxisLine, FunnelSeries } } as Meta; const Template: StoryFn = (args) => ; export const Basic = Template.bind({}); Basic.args = { id: 'basic', height: 300, width: 500, data: [ { key: 'Visited Site', data: 1000 }, { key: 'Added to Cart', data: 900 }, { key: 'Initiated Checkout', data: 600 }, { key: 'Purchased', data: 400 } ] }; export const LargeDataset = Template.bind({}); LargeDataset.args = { id: 'large-dataset', height: 300, width: 500, data: [ { key: 'Visited Site', data: 15000 }, { key: 'Added to Cart', data: 12000 }, { key: 'Initiated Checkout', data: 11000 }, { key: 'Purchased', data: 6000 }, { key: 'Subscribed', data: 5000 }, { key: 'Became a Member', data: 3000 }, { key: 'Upgraded to Premium', data: 1000 }, { key: 'Became a VIP', data: 900 } ], series: ( } />} onSegmentClick={(e) => console.log(e)} /> ) }; export const Interpolation = () => ( } />} data={[ { key: 'Visited Site', data: 1000 }, { key: 'Added to Cart', data: 900 }, { key: 'Initiated Checkout', data: 600 }, { key: 'Purchased', data: 400 } ]} /> ); export const Autosize = () => (
); export const Layered = () => ( } /> } /> ); export const LabelPosition = () => ( } />} /> } data={[ { key: 'Visited Site', data: 1000 }, { key: 'Added to Cart', data: 900 }, { key: 'Initiated Checkout', data: 600 }, { key: 'Purchased', data: 400 } ]} /> ); export const NoValue = () => ( } />} axis={} />} /> } data={[ { key: 'Visited Site', data: 1000 }, { key: 'Added to Cart', data: 900 }, { key: 'Initiated Checkout', data: 600 }, { key: 'Purchased', data: 400 } ]} /> );