พอเซฟเป็น UTF8 แล้วมันไม่ขึ้นรูปกราฟอะครับบ เป็นเครื่องหมายกากบาท อะครับ
นี้ Code ผม
<?php
include ("jpgraph/src/jpgraph.php");
include ("jpgraph/src/jpgraph_bar.php");
$m=$_POST['m'];
$db=mysql_connect("localhost","root","")or die(mysql_error());
mysql_select_db("databorrow",$db)or die(mysql_error());
$sql=mysql_query("select acce,count(*) from borrow where mid(dateborrow,4,2) = '$m' group by acce")or die(mysql_error());
while($row=mysql_fetch_array($sql))
{
$datay[]=$row[1];
$datax[]=$row[0];
}
// Create the graph. These two calls are always required
$graph = new Graph(400,300,"auto");
$graph->SetScale("textlin");
$graph->yaxis->scale->SetGrace(20);
// Add a drop shadow
$graph->SetShadow();
// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);
// Create a bar pot
$bplot = new BarPlot($datay);
// Adjust fill color
$bplot->SetFillColor('blue');
$bplot->value->Show();
$graph->Add($bplot);
// Setup the titles
$graph->title->Set("Graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");
$graph->title->SetFont(FF_ANGSA);
$graph->yaxis->title->SetFont(FF_ANGSA);
$graph->xaxis->title->SetFont(FF_ANGSA);
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_ANGSA,FS_NORMAL,14);
$graph->xaxis->SetLabelAngle(45);
// Display the graph
$graph->Stroke();
?>
มานเป็นเพราะอารัยหรอครับ แต่พอลองกับโค้ต อันอื่นมานได้อะครับ แต่อันนี้มานเป็นแบบที่บอกข้างต้นอะครับ
jagraph เป็นภาษาไทยไม่ได้อะครับ
Moderator: mindphp, ผู้ดูแลกระดาน
- beebee1
- PHP Jr. Member
- โพสต์: 14
- ลงทะเบียนเมื่อ: 01/01/1970 7:00 am
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41343
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
font ของ JP ที่ใช้ คงไม่สนับสนุน format chaset ที่ใช้ น่ะครับ
ติดตาม 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
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 76