谁试试php的flash的chart,高级的chart,免费的,本地的,漂亮的,动态的。
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
- HuntXu
- 帖子: 5776
- 注册时间: 2007-09-29 3:09
- mikewolf
- 帖子: 41
- 注册时间: 2008-04-29 19:49
I have tested, it is a nice widget. I have read the first tutorial and tried it. check out:
http://mikewolf.freehostia.com/ofc/chart.php
but I don't think man could get the "local" swf file.
we read first the quelle text of chart.php in Firefox, the more important sentences:
and
that means, I think, each time we product only the data quelle (data-2.php) to chart, but energie is the open-flash-chart.swf. this swf file will be open with the parameter. so there will be not "local" swf anymore.
Ofc., we can still setup the outlooks of the charts.
http://mikewolf.freehostia.com/ofc/chart.php
but I don't think man could get the "local" swf file.
we read first the quelle text of chart.php in Firefox, the more important sentences:
代码: 全选
<param name="movie" value="open-flash-chart.swf?width=500&height=250&data=http%3A%2F%2Fmikewolf.freehostia.com%2Fofc%2Fdata-2.php" />
代码: 全选
<embed src="open-flash-chart.swf?data=http%3A%2F%2Fmikewolf.freehostia.com%2Fofc%2Fdata-2.php" quality="high" bgcolor="#FFFFFF" width="500" height="250" name="chart" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="chart"/>
Ofc., we can still setup the outlooks of the charts.
- mikewolf
- 帖子: 41
- 注册时间: 2008-04-29 19:49
After some study, I find a solution for your local application maybe.
first we should rewrite the chart.php to chart.html
the two important sentences like these:
the data2-php will be also rewrite and save like this:
save the chart.html and data-2.php under the root of OFC, then open the chart.html with Firefox, you will get the local chart. But you can get it only with the chart.html file, that is still not the swf file. As the last post said, the energie of the chart is a whole swf file, we can't rewrite it.
first we should rewrite the chart.php to chart.html
the two important sentences like these:
代码: 全选
<param name="movie" value="open-flash-chart.swf?width=500&height=250&data=data-2.php" />
<embed src="open-flash-chart.swf?data=data-2.php" quality="high" bgcolor="#FFFFFF" width="500" height="250" name="chart" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="chart"/>
代码: 全选
&title=Spoon+sales+2008,{font-size: 26px;}&
&x_axis_steps=1&
&y_ticks=5,10,6&
&line=3,#87421F&
&values=39,24,32,12,39,17,19,7,9,32,3,28&
&x_labels=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec&
&y_min=0&
&y_max=60&
- solcomo
- 帖子: 2838
- 注册时间: 2007-04-25 13:12
-
- 帖子: 1
- 注册时间: 2008-08-02 21:27
&title=Spoon+sales+2008,{font-size: 26px;}&
&x_axis_steps=1&
&y_ticks=5,10,6&
&line=3,#87421F&
&values=39,24,32,12,39,17,19,7,9,32,3,28&
&x_labels=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec&
&y_min=0&
&y_max=60&
how to generate this file? maybe someone confuse on it, yeah,it is really a question.I got a method after serveral trying times. And the method is as follow:
firstly, copying the demo php file:chart-data.php to your root directory.
secondly,create a index.php like this
<?php
include_once './php-ofc-library/open_flash_chart_object.php';
open_flash_chart_object( 500, 250, './chart-data.php', false );
?>
<html>
<head>
</head>
<body>
<?php
echo 'Hello World!';
?>
</body>
</html>
thirdly,browse the index.php on your browser such as IE or FireFox,you will get the chart-object that writed "chart-data.php",selecting it and copy to a new file. you will found you get the data from the new file.
&x_axis_steps=1&
&y_ticks=5,10,6&
&line=3,#87421F&
&values=39,24,32,12,39,17,19,7,9,32,3,28&
&x_labels=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec&
&y_min=0&
&y_max=60&
how to generate this file? maybe someone confuse on it, yeah,it is really a question.I got a method after serveral trying times. And the method is as follow:
firstly, copying the demo php file:chart-data.php to your root directory.
secondly,create a index.php like this
<?php
include_once './php-ofc-library/open_flash_chart_object.php';
open_flash_chart_object( 500, 250, './chart-data.php', false );
?>
<html>
<head>
</head>
<body>
<?php
echo 'Hello World!';
?>
</body>
</html>
thirdly,browse the index.php on your browser such as IE or FireFox,you will get the chart-object that writed "chart-data.php",selecting it and copy to a new file. you will found you get the data from the new file.