Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Draggable Pie Chart #5434

Closed
ChristianRaoulis opened this issue Aug 18, 2023 · 4 comments
Closed

Question: Draggable Pie Chart #5434

ChristianRaoulis opened this issue Aug 18, 2023 · 4 comments
Assignees
Labels

Comments

@ChristianRaoulis
Copy link

I would love to create a Draggable Pie Chart (example) with G2 but I got no idea if something like that is even possible with G2.

Is that even possible?
If yes, how would i do something like that?

@hustcc
Copy link
Member

hustcc commented Aug 22, 2023

I'm trying to create a pie chart like this, but the challenge is calculating the new position of the sector when dragging the interactive point based on the angle.

Since it's difficult to determine the current angle of the sector and the angle after dragging the offset x y, it's best to create a custom shape for this pie chart. In this custom shape, you can draw the sector and the draggable point, and have access to more contextual information about the graphics.

@ChristianRaoulis
Copy link
Author

is there an example for that somewhere? Cuz i got no clue where to start 😅

@pearmini
Copy link
Member

I'll try to write a demo this week.

@pearmini pearmini added the V5 label Aug 23, 2023
@pearmini
Copy link
Member

pearmini commented Aug 28, 2023

@Skyriis Here is a demo for it.

@antvis antvis locked and limited conversation to collaborators Aug 28, 2023
@pearmini pearmini converted this issue into discussion #5473 Aug 28, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

3 participants