-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Component | Donut: Configurable central label offsets
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/dev/src/examples/misc/donut/half-donut-with-labels/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters