作者dcplay01 (dcplay)
看板PHP
标题[请益] 请问这段程式码 可以帮忙一下吗@@?
时间Thu Dec 20 17:56:28 2007
<?php
require_once("../lib/phpchartdir.php");
# The data for the chart
$data = array(90, 60, 65, 75, 40);
# The labels for the chart
$labels = array("Speed", "Reliability", "Comfort", "Safety", "Efficiency");
# Create a PolarChart object of size 450 x 350 pixels
$c = new PolarChart(450, 350);
# Set center of plot area at (225, 185) with radius 150 pixels
$c->setPlotArea(225, 185, 150);
# Add an area layer to the polar chart
$c->addAreaLayer($data, 0x9999ff);
# Set the labels to the angular axis as spokes
$angularAxisObj = $c->angularAxis();
$angularAxisObj->setLabels($labels);
# Create the image and save it in a temporary location
$chart1URL = $c->makeSession("chart1");
# Create an image map for the chart
$imageMap = $c->getHTMLImageMap("clickline.php", "",
"title='{xLabel}: US\$ {value|0}M'");
?>
<html>
<body topmargin="5" leftmargin="5" rightmargin="0" marginwidth="5" marginheight="5">
<div style="font-size:18pt; font-family:verdana; font-weight:bold">
Simple Clickable Bar Chart
</div>
<hr color="#000080">
<div style="font-size:10pt; font-family:verdana; margin-bottom:20">
<a href="viewsource.php?file=<?php echo $_SERVER["SCRIPT_NAME"]?>">View Source Code</a>
</div>
<img src="getchart.php?<?php echo $chart1URL?>" border="0" usemap="#map1">
<map name="map1">
<?php echo $imageMap?>
</map>
</body>
</html>
这程式的函式库
function getHTMLImageMap($url, $queryFormat = "", $extraAttr = "", $offsetX = 0, $offsetY = 0) {
return callmethod("LegendBox.getHTMLImageMap", $this->ptr, $url, $queryFormat, $extraAttr, $offsetX, $offsetY);
}
请问结果没有显示图片耶.....
不知道要修改哪边才符合显示
大大就想像 一个雷达图 它可以点击数值去连结其他的网页
是用PHP的 chartdirector这个套件
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 125.229.201.153