Skip to content

Customize bar shape to have a triangular edge. #3722

Answered by ckifer
nehakhands asked this question in Q&A
Discussion options

You must be logged in to vote

But in this case, you can use the Polygon shape to achieve what you want.

See this storybook story as an example https://master--63da8268a0da9970db6992aa.chromatic.com/?path=/story/api-shapes-polygon--using-connect-nulls

And going off of that you can produce something like
https://codesandbox.io/s/bar-chart-with-customized-shape-forked-cyghk4?file=/src/App.tsx

By using the coordinates and a few simple calulations

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@nehakhands
Comment options

@ckifer
Comment options

Answer selected by ckifer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants