import React from 'react' import { type Meta } from '@storybook/react-vite' import { lineAnimationDuration } from '../../services/GraphHelperServiceTyped' import { DocsTemplate } from '../../../.storybook' export const Example = (args: { length: number }): React.JSX.Element => { const { length } = args const result = lineAnimationDuration(length) return ( <> Input Length: {length}
Animation Duration: {result}ms ) } Example.storyName = 'lineAnimationDuration' Example.args = { length: 10, } export default { title: 'Helper Functions/lineAnimationDuration', component: Example, argTypes: { length: { control: 'number', description: 'The number of data points to determine animation duration.', }, }, parameters: { viewMode: 'docs', previewTabs: { canvas: { hidden: true }, }, docs: { page: () => ( <> lineAnimationDuration is used to calculate the animation duration based on dataset size. , The function takes one argument: , Returns the animation duration in milliseconds: , ]} /> ), }, }, } as Meta