pChart 2.x forum
http://wiki.pchart.net/forum/

Bug in setSliceColor (incorrect Alpha)
http://wiki.pchart.net/forum/viewtopic.php?f=5&t=22
Page 1 of 1

Author:  theodamien [ Mon Dec 13, 2010 2:07 pm ]
Post subject:  Bug in setSliceColor (incorrect Alpha)

Please correct Format Alpha:

Code:
  /* Set the color of the specified slice */
   function setSliceColor($SliceID,$Format="")
    {
     $R      = isset($Format["R"]) ? $Format["R"] : 0;
     $G      = isset($Format["G"]) ? $Format["G"] : 0;
     $B      = isset($Format["B"]) ? $Format["B"] : 0;
==>   $Alpha   = isset($Format["alpha"]) ? $Format["Alpha"] : 100; <==

     $this->pDataObject->Palette[$SliceID]["R"]     = $R;
     $this->pDataObject->Palette[$SliceID]["G"]     = $G;
     $this->pDataObject->Palette[$SliceID]["B"]     = $B;
     $this->pDataObject->Palette[$SliceID]["Alpha"] = $Alpha;
    }


TO

Code:
/* Set the color of the specified slice */
   function setSliceColor($SliceID,$Format="")
    {
     $R      = isset($Format["R"]) ? $Format["R"] : 0;
     $G      = isset($Format["G"]) ? $Format["G"] : 0;
     $B      = isset($Format["B"]) ? $Format["B"] : 0;
     $Alpha   = isset($Format["Alpha"]) ? $Format["Alpha"] : 100;

     $this->pDataObject->Palette[$SliceID]["R"]     = $R;
     $this->pDataObject->Palette[$SliceID]["G"]     = $G;
     $this->pDataObject->Palette[$SliceID]["B"]     = $B;
     $this->pDataObject->Palette[$SliceID]["Alpha"] = $Alpha;
    }

Author:  jean-damien [ Mon Dec 13, 2010 2:12 pm ]
Post subject:  Re: Bug in setSliceColor (incorrect Alpha)

Stupid typo. Fixed in the 2.0.7

Thanks for having reported it ;o)

JD.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/