|
|
|
ถามเรื่อง JP กราฟ หน่อยครับ พอ Run เเล้ว error ครับ unknow font font family specification |
|
|
|
|
|
|
|
Code (PHP)
<?php
require("../jpgraph.php"); //this is path of tool
require("../jpgraph_bar.php");
require("../jpgraph_flags.php");
include ("connect.php") ;
$sql1 = "select * from tb_year ";
$result = mysql_query($sql1)
or die("query error 1 ".mysql_error());
$sumtotal = 0;
while ($rs = mysql_fetch_array($result)){
$xdata[] = $rs["name_year"];
$ydata[] = $rs["total_year"];
}
$graph = new Graph(350,450);
$graph->SetScale("textlin");
$graph->SetMarginColor('white');
$graph->SetBackgroundGradient("white","whitesmoke",GRAD_HOR, BGRAD_MARGIN);
$graph->SetShadow();
$graph->SetMargin(40,30,20,40);
$graph->title->SetFont(FF_TAHOMA, FS_BOLD,12);
$graph->title->Set(iconv('TIS-620','UTF-8',"รายงาน"));
$graph->subtitle->SetFont(FF_TAHOMA, FS_BOLD,12);
$graph->subtitle->Set(iconv('TIS-620','UTF-8',"รายงานลูกค้า"));
$graph->xaxis->title->Set("name_year");
$graph->yaxis->title->Set("Bath");
$graph->xaxis->SetTickLabels($xdata);
$graph->SetMarginColor('white');
$graph->SetBackgroundGradient("white","whitesmoke",GRAD_HOR, BGRAD_MARGIN);
$bplot = new BarPlot($ydata);
$bplot->SetFillGradient('white','pink',GRAD_VERT);
$bplot->SetColor('gainsboro');
$bplot->SetWeight(1);
$bplot->value->Show();
$bplot->value->SetFont(FF_TAHOMA, FS_BOLD,8);
$bplot->value->SetAngle(45);
$graph->Add($bplot);
$graph->Stroke();
?>
พอ Run เเล้ว error ครับ unknow font font family specification.
Tag : - - - -
|
|
|
|
|
|
Date :
2010-02-22 13:24:37 |
By :
deathzap |
View :
993 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|