antvis/G2

Question: Draggable Pie Chart #5434

Skyriis posted onGitHub

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?


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.

posted by hustcc over 1 year ago

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

posted by Skyriis over 1 year ago

I'll try to write a demo this week.

posted by pearmini over 1 year ago

@Skyriis Here is a demo for it.

posted by pearmini over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests