2014-04-06 4 views
0

$graph->SetColor('red'); doesnt't 정말 JPGraph의 example0.html에서 (아무것도 할 것으로 보인다 :설정 플롯 영역의 배경 색상은

<?php // content="text/plain; charset=utf-8" 
require_once ('jpgraph/jpgraph.php'); 
require_once ('jpgraph/jpgraph_line.php'); 

// Some data 
$ydata = array(11,3,8,12,5,1,9,13,5,7); 

// Create the graph. These two calls are always required 
$graph = new Graph(350,250); 
$graph->SetScale('textlin'); 
$graph->SetColor('red'); #  <---- this does nothing 
// Create the linear plot 
$lineplot=new LinePlot($ydata); 
$lineplot->SetColor('blue'); 

// Add the plot to the graph 
$graph->Add($lineplot); 

// Display the graph 

$graph->Stroke(); 
?> 

내가 무엇을 놓치고

내가가 필요 발견
+0

'$ graph-> SetBox(); '? –

답변

0

축 격자의 표시를 비활성화하면 배경색 설정보다 우선합니다 .을 추가 한 후 색상 설정이 적용되었습니다.