Skip to content

Commit

Permalink
Component | Donut: Add label offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
curran committed Dec 10, 2024
1 parent 18d8622 commit a9a59ca
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react'
import { VisSingleContainer, VisDonut } from '@unovis/react'
import { DONUT_HALF_ANGLE_RANGE_TOP } from '@unovis/ts'

export const title = 'Half Donut: Labels'
export const subTitle = 'Testing the label offsets'
export const component = (): 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={0}
arcWidth={80}
angleRange={DONUT_HALF_ANGLE_RANGE_TOP}
centralLabel='Central Label'
centralSubLabel='Central Sub Label'
centralLabelsOffsetY={-24}
/>
</VisSingleContainer>
)
}

0 comments on commit a9a59ca

Please sign in to comment.