 |
jpgraph การแสดง alt tag แสดงค่าของแท่งกราฟเวลาเอาเมาส์ชี้ |
|
 |
|
|
 |
 |
|
ผมเขียนโค้ดภาษา php กับ jpgraph อยู่ครับ ผมอยากทำกราฟแท่งหรือกราฟวงกลมที่เวลาเราเอาเมาส์ไปชี้ที่แท่งกราฟแล้วมีหน้าต่างๆ alt tag แสดงค่าของกราฟขึ้นมา ไม่ทราบว่าผมต้องเขียนโค้ดอย่างไรครับ
ขอบคุณครับ
Code (PHP)
<?php
include ("jpgraph/jpgraph.php");
include ("jpgraph/jpgraph_bar.php");
//print $_POST["year"];
// We need some data
$datay=array(4,8,6);
//$datay=array(1,2,1);
// Setup the graph.
$graph = new Graph(200,150,"auto");
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);
$graph->title->Set('"GRAD_WIDE_MIDVER"');
$graph->title->SetColor('darkred');
// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);
// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);
// Setup color for gradient fill style
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDVER);
// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);
// Finally send the graph to the browser
$graph->Stroke();
?>
Tag : PHP, MySQL, JavaScript, WebService
|
|
 |
 |
 |
 |
Date :
2011-09-08 14:48:55 |
By :
สายฟ้า |
View :
1407 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เปลี่ยนไปใช้ Flash ครับ เห็น Fusion Chart ก็มีอยู่ครับ ค้นหาในกระทู้เก่า ๆ ได้ครับ
|
 |
 |
 |
 |
Date :
2011-09-08 16:36:39 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ สรุปคือ jpgraph มันทำไม่ได้ใช่ไหมครับ
|
 |
 |
 |
 |
Date :
2011-09-08 20:47:07 |
By :
สายฟ้า |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่ได้ครับ
|
 |
 |
 |
 |
Date :
2011-09-08 20:53:02 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
https://www.thaicreate.com ลองไปหาดูในนี้ครับ
|
 |
 |
 |
 |
Date :
2011-09-14 12:03:51 |
By :
aobbie_p |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|