PHP에서 JpGraph를 사용했습니다. 모두 괜찮지 만 slice ($ p1-> SetSliceColors ($ color);)는 작동하지 않습니다. 항상 기본 색상입니다. 여기 내 사용 된 코드입니다. 제발 도와주세요 :JpGraph 원형 차트 슬라이스 색상이 작동하지 않습니다.
$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);
// Setup the labels to be displayed
$p1->SetLabels($labels);
$p1->SetLabelPos(1);
$p1->SetLabelType(PIE_VALUE_PER);
$p1->value->Show();
$p1->value->SetFont(FF_FONT1,FS_NORMAL,9);
$p1->value->SetColor('navy');
$graph->Add($p1);
$graph->Stroke();
고맙다! 'ClearTheme()'이 나를 위해 그것을 분류했다. – Kiee