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

increase radius of the position of Pie chart values #58

Open
louisreynaud opened this issue Jul 13, 2018 · 1 comment
Open

increase radius of the position of Pie chart values #58

louisreynaud opened this issue Jul 13, 2018 · 1 comment

Comments

@louisreynaud
Copy link

louisreynaud commented Jul 13, 2018

Hello,

I have a question :

Is there a way to increase the radius of the position of my pie chart Value?
Right now it looks like this :

img_pie

And though it is nice, I would like to push the values near the external border of the pie. In your Pie class code, I saw this :
if ($ValuePosition == PIE_VALUE_OUTSIDE) { $Xc = cos(($Angle - 90) * PI / 180) * ($Radius + $ValuePadding) + $X; $Yc = sin(($Angle - 90) * PI / 180) * ($Radius + $ValuePadding) + $Y; } else { $Xc = cos(($Angle - 90) * PI / 180) * ($Radius) / 2 + $X; $Yc = sin(($Angle - 90) * PI / 180) * ($Radius) / 2 + $Y; }

I assumed it was the position of the values depending on the $ValuePosition referenced in the $Format array parameter.

I was wondering if for those lines :
$Xc = cos(($Angle - 90) * PI / 180) * ($Radius) / 2 + $X; $Yc = sin(($Angle - 90) * PI / 180) * ($Radius) / 2 + $Y;

we could set another parameter from $Format, something like 'ValueRadius' which would replace ($Radius)/2.

Thanks,

@szymach
Copy link
Owner

szymach commented Jul 13, 2018

Well, to be honest, it is not really my code. I have just ported the library to Github and updated it somewhat, trying to keep backwards compatibility as much as I could.

If you would like to try and make the changes proposed here, post a PR and I will review it, just remember to add a test case for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants