昊 天

dotnetCHARTING的使用
今天试用了DotnetCHARTING for asp.net 3.3,打开其附带的例子都能正常地显示结果。但是在Microsoft Visual Studio .NET 2003中新建一个ASP.net项目后,始终不能成功显示图片,将DotnetCHARTING自带的例子程序拷贝过来编译成功但还是不能显示图片。

调了一天多,在网上查找相关资料,好少啊。
还好,从http://borland.mblogger.cn/scyangyu/posts/22999.aspx 找到啦。
原来是没有添加Temp子目录,原来生成的在程序中有这样一条语句:
Chart.TempDirectory="temp";
Temp目录用于存放生成的图片文件。 根据帮助,我增加了Temp子目录,也把database子目录拷了过来。还是一片空,不能显示图片。

 找到问题之所在:

原来是新建的Temp子目录的权限没有设置为可写。修改后一切OK,哈哈,终于搞定啦。高兴
 
效果出来了,可是底部有个 netCHARTING Mentor 信息还没去掉, 这个是dotnetCHARTING为调试专用的.
如果想去掉,需要加上这两句: Chart.Debug = false;Chart.Mentor = false;

另外:
如果想修改Temp子目录的权限时,却发现没有安全(Security)这页时,查看如下帮助:

Setting Directory Permissions:

.netCHARTING creates image files dynamically to display charting data. By default, these temporary images are written to the same directory of the calling script, alternatively, the TempDirectory property can be set to a path of your choice. Either way, the ASP.NET worker process must have permissions to write to this directory. If your permissions are not already configured to allow write access, right click on the directory in question and select properties, select security, permissions and add the ASPNET user with write permissions.

If you are missing a security tab, see this article(http://www.dougknox.com/xp/tips/xp_security_tab.htm).

----------------------------------------------
How Do I Get the Security tab in Folder Properties?

First, your hard drive must be formatted NTFS for this tab to show up.

Second, if you're running XP Pro, you must open Windows Explorer, go to Tools, Folder Options, View and uncheck Use Simple File Sharing.

若你的版本有水印,哈哈也可解决哦:
水印去掉, 详见http://hqt.cnblogs.com/archive/2005/09/22/241971.html


posted on 2006-07-04 13:41  Tutuya  阅读(1270)  评论(0)    收藏  举报