Unknown font font family specification มานแปลว่าอารัยหรอครับ แล้ววิธีแก้ต้องทำไงอะครับ ขอบคุงงล่วงหน้า ครับ
Code ที่ผมเขียนครับมานผิดตรงไหนหรอครับ
<?php
include ("jpgraph/src/jpgraph.php");
include ("jpgraph/src/jpgraph_line.php");
$db=mysql_connect("localhost","root","")or die(mysql_error());
mysql_select_db("jpgarph",$db)or die(mysql_error());
$sql=mysql_query("SELECT * FROM electric")or die(mysql_error());
while($row=mysql_fetch_array($sql))
{
$data2y[]=$row[2];
$datay[]=$row[1];
$datax[]=$row[0];
}
$graph=new Graph(600,450,"auto");
$graph->img->SetMargin(40,150,40,80);
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->title->Set("a");
$graph->title->SetFont(FF_AngsanaUPC,FS_NORMAL,14);
$graph->legend->Pos(0.03,0.5,"right","center");
$graph->legend->SetFont(FF_AndsanaUPC,FS_NORMAL);
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_AngsanaUPC,FS_NORMAL,14);
$graph->xaxis->SetLabelAngle(45);
$p1=new LinePlot($datay);
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->value->SetFont(FF_AngsanaUPC,FS_NORMAL,12);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->SetColor("blue");
$p1->SetCenter();
$p1->SetLegend("b");
$graph->Add($p1);
$p2=new LinePlot($data2y);
$p2->mark->SetType(MARK_STAR);
$p2->value->SetFont(FF_AngsanaUPC,FS_NORMAL,12);
$p2->mark->SetFillColor("red");
$p2->mark->SetWidth(4);
$p2->SetColor("red");
$p2->SetCenter();
$p2->SetLegend("c");
$graph->Add($p2);
$graph->Stroke();
?>
ผมใช้ jpgraph แล้วมาขึ้น eorro แบบนี้อะครับ ช่วยดูทีครับ
Moderator: mindphp, ผู้ดูแลกระดาน
- beebee1
- PHP Jr. Member
- โพสต์: 14
- ลงทะเบียนเมื่อ: 01/01/1970 7:00 am
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41416
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
มันหา font ไม่เจอครับ วิธี คือ เอา font ที่เรา กำหนด ไปไว้ ใน JP
หรือเปลี่ยน font
$graph->title->SetFont(FF_AngsanaUPC,FS_NORMAL,14);
เป็น อย่าง อื่น ที่ server เรา มี font อยู่ แล้ว
หรือเปลี่ยน font
$graph->title->SetFont(FF_AngsanaUPC,FS_NORMAL,14);
เป็น อย่าง อื่น ที่ server เรา มี font อยู่ แล้ว
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
- 5 ตอบกลับ
- 2705 แสดง
-
โพสต์ล่าสุด โดย Jatuporn.k
08/07/2014 3:43 pm
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: Google [Bot], Majestic-12 [Bot] และบุคลทั่วไป 112