Skip to content
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

[BUG] Issue when having two values in PieChart they overlap each other #105

Open
EiTaNBaRiBoA opened this issue May 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@EiTaNBaRiBoA
Copy link

EiTaNBaRiBoA commented May 10, 2024

Describe the bug
when setting var y: Array = ["Java", "JavaScript"] and var x: Array = [5, 6] the percentage of the numbers overlap each other
image

To Reproduce
Steps to reproduce the behavior:
Go to the piechart example, edit control.gd script and change the x,y values
var y: Array = ["Java", "JavaScript"]
var x: Array = [5, 6]

Expected behavior
Numbers not being overlapping

Desktop (please complete the following information):

  • OS: Windows
  • Godot Engine Version 4.2.2
  • Plugin Version: 24.05.06
@EiTaNBaRiBoA EiTaNBaRiBoA added the bug Something isn't working label May 10, 2024
@AmyGilhespy
Copy link

AmyGilhespy commented May 11, 2024

Looking at the code, this happens anytime an arc is larger than (or equal to?) PI radians, because pie_plotter.gd, line 64: var mid_point: Vector2 = (slice[-1] + slice[1]) / 2 doesn't take into account slices that are larger than a half circle. I have confirmed this with the data [1, 2, 3, 10] in the example:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants