I used JpGraph in php. Everything is fine, but the slice ($ p1-> SetSliceColors ($ color);) the color does not work. This is all time by default. Here is my used code. Please help me:
$data = array('40','50', '10'); $Legends = array('Loss','Win', 'Draw'); $labels = array("Loss\n(%.1f%%)","Win\n(%.1f%%)","Draw\n(%.1f%%)"); $color = array('red','red','red'); $graph = new PieGraph(550,350); $graph->SetShadow(); $p1 = new PiePlot3D($data); $p1->ExplodeSlice(1); $p1->SetCenter(0.55); $p1->SetLegends($Legends); $graph->legend->Pos(0.5,0.1); $p1->SetTheme("earth"); $p1->SetSliceColors($color);
source share