You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to increase the radius of the position of my pie chart Value?
Right now it looks like this :
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,
The text was updated successfully, but these errors were encountered:
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!
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 :
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,
The text was updated successfully, but these errors were encountered: