Skip to content

Commit

Permalink
Dev | Examples | Donut: Add full height donut example
Browse files Browse the repository at this point in the history
- Adds a new example for a full height donut chart
- Tests the resize behavior of the donut chart component

#455
  • Loading branch information
rokotyan authored and lee00678 committed Oct 21, 2024
1 parent 2603003 commit 42b5f28
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/dev/src/examples/misc/donut/donut-full-height/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react'
import { VisSingleContainer, VisDonut } from '@unovis/react'
import { ExampleViewerDurationProps } from '@src/components/ExampleViewer/index'

export const title = 'Donut: Full Height'
export const subTitle = 'Testing the resize behavior'

export const component = (props: ExampleViewerDurationProps): JSX.Element => {
const data = [3, 2, 5, 4, 0, 1]
return (
<VisSingleContainer style={{ height: '100%' }}>
<VisDonut
value={d => d}
data={data}
padAngle={0.02}
duration={props.duration}
arcWidth={80}
/>
</VisSingleContainer>
)
}

0 comments on commit 42b5f28

Please sign in to comment.