首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gRaphael库编译错误

gRaphael库编译错误
EN

Stack Overflow用户
提问于 2013-06-25 11:20:06
回答 1查看 82关注 0票数 0

我正在尝试使用gRapahel库在我的网站项目中创建条形图。我需要使用这个库,因为标准的ajax控件在IE8中不工作。我已经将所有*.js文件添加到我的项目中,并且我还在web.config文件中添加了以下行:

代码语言:javascript
复制
  <codeSubDirectories>
    <add directoryName="CSCode"/>
    <add directoryName="JSCode"/>
  </codeSubDirectories>

当我试图编译我的项目时,我在App_SubCode_JSCode.qgb8opkc.6.js文件中发现了3个错误:

在自定义属性中只允许使用基本类型。 未知自定义属性类或构造函数 变量“System”尚未声明

当我双击“色情”时,它会将我重定向到包含以下行的错误文件:

代码语言:javascript
复制
    //------------------------------------------------------------------------------
/// <autogenerated>
///     This code was generated by a tool.
///     Runtime Version: 4.0.30319.269
///
///     Changes to this file may cause incorrect behavior and will be lost if 
///     the code is regenerated.
/// </autogenerated>
//------------------------------------------------------------------------------

[assembly: System.CodeDom.Compiler.GeneratedCodeAttribute("ASP.NET", "4.0.30319.272")]
[assembly: System.Security.SecurityRulesAttribute(System.Security.SecurityRuleSet.Level2)]
[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0")]

你能帮我解决这个问题吗?提前谢谢。

编辑1:

我添加了下面的代码来创建图表,但是我得到了错误:

Microsoft JScript运行时错误:预期对象

在线:

R= Raphael("InputHours"),

代码语言:javascript
复制
<script type="text/javascript">
        window.onload = function () {
            var r = Raphael("InputHours"),
                    fin = function () {
                        this.flag = r.popup(this.bar.x, this.bar.y, this.bar.value || "0").insertBefore(this);
                    },
                    fout = function () {
                        this.flag.animate({ opacity: 0 }, 300, function () { this.remove(); });
                    },
                    fin2 = function () {
                        var y = [], res = [];
                        for (var i = this.bars.length; i--; ) {
                            y.push(this.bars[i].y);
                            res.push(this.bars[i].value || "0");
                        }
                        this.flag = r.popup(this.bars[0].x, Math.min.apply(Math, y), res.join(", ")).insertBefore(this);
                    },
                    fout2 = function () {
                        this.flag.animate({ opacity: 0 }, 300, function () { this.remove(); });
                    },
                    txtattr = { font: "12px sans-serif" };

            r.text(160, 10, "Single Series Chart").attr(txtattr);
            r.text(480, 10, "Multiline Series Stacked Chart").attr(txtattr);
            r.text(160, 250, "Multiple Series Chart").attr(txtattr);
            r.text(480, 250, "Multiline Series Stacked Chart\nColumn Hover").attr(txtattr);

            r.barchart(10, 10, 300, 220, [[55, 20, 13, 32, 5, 1, 2, 10]]).hover(fin, fout);
            r.hbarchart(330, 10, 300, 220, [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55]], { stacked: true }).hover(fin, fout);
            r.hbarchart(10, 250, 300, 220, [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55]]).hover(fin, fout);
            var c = r.barchart(330, 250, 300, 220, [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55]], { stacked: true, type: "soft" }).hoverColumn(fin2, fout2);
        };



    </script>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-25 11:33:21

我找到了解决这个问题的办法(我想)。我将CSCode移出App_Code文件夹,并能够编译该项目。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17295941

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档