Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/397.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.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
Javascript Flot:series是选项中的意外标识符_Javascript_Jquery_Flot - Fatal编程技术网

Javascript Flot:series是选项中的意外标识符

Javascript Flot:series是选项中的意外标识符,javascript,jquery,flot,Javascript,Jquery,Flot,新手问题。使用flotjquery库,我试图设置series选项,但在series:{行上出现了一个错误:“意外标识符” 我试着去理解,是不是有什么我不明白的 <!DOCTYPE html> <html> <head> <title>Flot Graph Testing</title> <script src="jquery-2.0.3.js"></script> <script s

新手问题。使用flotjquery库,我试图设置series选项,但在
series:{
行上出现了一个错误:“意外标识符”

我试着去理解,是不是有什么我不明白的

<!DOCTYPE html>
<html>
<head>
    <title>Flot Graph Testing</title>
    <script src="jquery-2.0.3.js"></script>
    <script src="jquery.flot.js"></script>
    <script type="text/javascript">

    $(function() {

        var options = {
            grid: {
                show: false
            }
            series: {
                bars: {
                    show:true
                }
            }
        };

        var rawdata = [[0, 3], [2, 8], [4, 5], [6, 13]];
        var data = [{data: rawdata }]
        $.plot("#placeholder", data, options);

        // Add the Flot version string to the footer

        $("#footer").prepend("Flot " + $.plot.version + " &ndash; ");
    });

    </script>
</head>

<body>
    <div id="header">
        <h2>Flot graph</h2>
    </div>

    <div id="content">
        <div class="container">
            <div id="placeholder" class="my-placeholder" style="width:600px;height:300px"></div>
        </div>
        <p>This is a flot graph</p>
    </div>
</body>
</html>

弗洛特图检验
$(函数(){
变量选项={
网格:{
节目:假
}
系列:{
酒吧:{
秀:真的
}
}
};
VarRawData=[[0,3]、[2,8]、[4,5]、[6,13];
var data=[{data:rawdata}]
$.plot(“占位符”、数据、选项);
//将Flot版本字符串添加到页脚
$(“#页脚”).prepend(“Flot”+$.plot.version+“&ndash;”);
});
弗洛特图
这是一个flot图


您缺少一个逗号来分隔
选项
对象的属性:

    var options = {
        grid: {
            show: false
        }, // <-- comma
        series: {
            bars: {
                show:true
            }
        }
    };
var选项={
网格:{
节目:假
}, //