未捕获的TypeError:添加任何过滤器时无法读取未定义错误的属性'FN'

时间:2019-03-02 11:59:47

标签: c# asp.net-mvc zingchart

我正在asp.net mvc上工作。而且我使用的是Zing图表,当我不添加任何位置过滤器时却可以正常工作,但是当我添加任何位置过滤器时,都显示了zingchart,但最后一个表未打开并给出了错误:

未捕获的TypeError:无法读取HTMLDocument.e(eval在(zingchart)处HTMLAreaElement.p.SM(eval在(zingchart.min.js:8),:1:490052)的undefined属性'FN' .min.js:8)、: 1:87308)

我的脚本:

<script>
$(document).ready(function () {

    GenerateChart(FileLocationFinancial.value);

});
var month = "";

function GenerateChart(FileLocation) {

    $('#chartDiv3').html(" ");
    url = "../Report/FinancialMonthly?LocationName=" + FileLocation;
    $.ajax(
        {
            url: url,
            type: "GET",
            async: true,
            success: function (data, textStatus, jqXHR) {
                $('#chartDiv3').html('');
                setTimeout(function () {
                    zingchart.render({
                        id: "chartDiv3",
                        height: 800,
                        width: "100%",
                        data: data
                    });
                }, 1000);
            },
            error: function (jqXHR, textStatus, errorThrown) {
                alert("Failed to get data. Please contact support team.")
                //if fails
            }
        });

    zingchart.node_click = function (p) {
        debugger;
        console.log("Plotindex "+p.plotindex);
        console.log("nodeindex "+p.nodeindex);
        console.log("id " + p.id);

        if (p.graphid === "chartDiv3-graph-months")
        { 

            url = "../Report/FinancialDailyList?month=" + month + "&day=" + p.scaletext + "&FileLocation=" + FileLocation;
            $.ajax(
                {
                    url: url,
                    type: "GET",
                    async: true,
                    success: function (data, textStatus, jqXHR) {
                        debugger;
                        setTimeout(function () { $("#dailyList").html(data); }, 1000);
                        // $("#dailyList").html(data);
                    },
                    error: function (jqXHR, textStatus, errorThrown) {
                        alert("Failed to get data. Please contact support team.")
                    }
                });
        }
        else {
            setTimeout(function () {
                month = p.scaletext;
                $("#dailyList").html("");
            }, 1000);
        }
    }
}

$("#FileLocationFinancial").change(function () {
    // console.log(FileLocationFinancial.value);
    var data = FileLocationFinancial.value;
    $("#dailyList").html(" ");
//    $('#chartDiv3').html(" ");

    GenerateChart(data);

});

0 个答案:

没有答案