html是没法处理数据库里的数据的。
PHP的话,有很多方法,推荐种jpgraph做的图表:

复制内容到剪贴板
代码:
<?php
include ("../jpgraph.php");
include ("../jpgraph_bar.php");
$datay=array(4,8,9,80,60,35,95);//测试数据,可直接进行添加或从数据库中读取
// Setup the graph.
$graph = new Graph(400,300,"auto"); //创建新的Graph对象,图片长:400px,宽300px
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);//标题为中文字体
$graph->title->Set('jpgraph.cn中文站柱型图表演示');
$graph->title->SetColor('darkred');//标题颜色:深红
//$graph->xaxis->SetFont(FF_FONT1);//坐标没有说明字,可以省略这两句
//$graph->yaxis->SetFont(FF_FONT1);
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);
//$bplot->SetFillGradient("navy","lightsteelblue",GRAD_MIDVER);//这句可以使柱变光滑
$bplot->SetColor("navy");//柱型颜色
$graph->Add($bplot);
// Finally send the graph to the browser
$graph->Stroke();
?>类库下载:
http://www.jpgraph.cn/download.asp
或:
http://www.aditus.nu/jpgraph/jpdownload.php
[
本帖最后由 kuhanzhu 于 2008-7-4 08:52 编辑 ]