PHP Classes

improvement of class

Recommend this page to a friend!

      TinyPie  >  All threads  >  improvement of class  >  (Un) Subscribe thread alerts  
Subject:improvement of class
Summary:white line in bigger pie chart
Messages:3
Author:Jaroslav
Date:2012-01-03 15:35:42
Update:2012-01-09 22:05:17
 

  1. improvement of class   Reply   Report abuse  
Picture of Jaroslav Jaroslav - 2012-01-03 15:35:42
Hi,
this is nice class but when it creates bigger chart and $step in method InternalRendering is real number then the chart contents white line.
For example
$g = new TinyPie(256);
$g->AddValue(50, 'CC0000');
$g->AddValue(5, '555555');
echo $g->GetAsImg();

Fix is simple:
in method InternalRendering a line
$step = (((int)$value[0] / $sum) * 360);
to replace with a line
$step = round ((((int)$value[0] / $sum) * 360));

  2. Re: improvement of class   Reply   Report abuse  
Picture of David Frendin David Frendin - 2012-01-03 18:59:21 - In reply to message 1 from Jaroslav
Thank you very much for the improvement, I will update the package within short.

  3. Re: improvement of class   Reply   Report abuse  
Picture of David Frendin David Frendin - 2012-01-09 22:05:17 - In reply to message 1 from Jaroslav
The suggested improvements have been added to the sources, as of v1.0.1.

 
For more information send a message to info at phpclasses dot org.