Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/446.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 谷歌可视化区域图给出;无效参数";在IE7中_Php_Javascript_Jquery_Google Visualization - Fatal编程技术网

Php 谷歌可视化区域图给出;无效参数";在IE7中

Php 谷歌可视化区域图给出;无效参数";在IE7中,php,javascript,jquery,google-visualization,Php,Javascript,Jquery,Google Visualization,我从一个ajax调用中得到一个json字符串,我将它粘贴在Google可视化区域图中。我发现,只要数据中只有一行,GV就会在IE7中返回“Invalid Argument”,但它在所有其他浏览器中都能工作 这是我从ajax调用中得到的数组 Array ( [0] => Array ( [cols] => Array ( [0] => Array

我从一个ajax调用中得到一个json字符串,我将它粘贴在Google可视化区域图中。我发现,只要数据中只有一行,GV就会在IE7中返回“Invalid Argument”,但它在所有其他浏览器中都能工作

这是我从ajax调用中得到的数组

Array
(
    [0] => Array
        (
            [cols] => Array
                (
                    [0] => Array
                        (
                            [label] => Time Dispersion
                            [type] => string
                        )

                    [1] => Array
                        (
                            [label] => Score
                            [type] => number
                        )

                )

            [rows] => Array
                (
                    [0] => Array
                        (
                            [c] => Array
                                (
                                    [0] => Array
                                        (
                                            [v] => SA-00:00
                                        )

                                    [1] => Array
                                        (
                                            [v] => 50
                                        )
                                )
                        )
                )
        )
)
这是ajax调用,以及表设置

$.getJSON(url, function(fpdata) {
    //load summary of footprint chart
    var prepdata = fpdata.timesum[0];
    var data = new google.visualization.DataTable(prepdata, 0.5);
    var chcontainer = 'eleid';
    var chart = new google.visualization.AreaChart(document.getElementById(chcontainer)); 
    var options = {width: fpwidth, height: fpheight, titleFontSize: 14, is3D: true, legend: 'none', title: 'Title',
        pointSize: 0,  vAxis: {maxValue: 100, title: 'Percentage Correct'}  , hAxis: {title: 'Title'}
    };

    chart.draw(data, options ); 
    $("#"+chcontainer).append('<br /><span class="printthis">[Print]</span>');
});
$.getJSON(url,函数(fpdata){
//封装外形图的负载汇总
var prepdata=fpdata.timesum[0];
var data=new google.visualization.DataTable(prepdata,0.5);
var chcontainer='eleid';
var chart=newgoogle.visualization.AreaChart(document.getElementById(chcontainer));
var options={width:fpwidth,height:fpheight,titleFontSize:14,is3D:true,图例:“无”,标题:“标题”,
pointSize:0,vAxis:{maxValue:100,title:'Percentage Correct'},hAxis:{title:'title'}
};
图表绘制(数据、选项);
$(“#”+chcontainer).append(“
[Print]”); });
面积图至少需要两行,才能从一点到另一点形成一条直线。为了解决这个问题,我加入了一个复选框,如果只有一个数据结果,它会将第一行设置为零


如果GV能将其放在API文档的某个地方,那就太好了。

面积图至少需要两行,才能从一点到另一点形成一条直线。为了解决这个问题,我加入了一个复选框,如果只有一个数据结果,它会将第一行设置为零

如果GV能把它放在API文档中的某个地方,那就太好了