Uncaught Reference Error: Unexpected Token }

<script type="text/javascript">
    $(function () {
    var plot = $.plot($("#content"), [{
        color: '#6B6B84',
        label: 'normal one',
        data: [
            [
                [10, 0],
                [13, 5]
            ]
        ]
    }, {
        color: '23641E',
        label: 'modified',
        data:
    }], {
        xaxis: {
            mode: "time",
            timeformat: "%d/%m/%y"
        },
        grid: {
            hoverable: true,
            autoHighlight: true
        }
    });
});
</script>

The above code is showing "Uncaught Reference Error: Unexpected Token }" in Chrome. I have defined a div element with id=content. The above code is to draw graph using "Flot". Would greatly appreciate you guyz help here! I am using django here.

Answers


I've reformatted your code to make it easier to read. You can now see the second data: element has no value, which is the source of your error.

$(function() {
    var plot = $.plot($("#content"), [
        { 
            color:'#6B6B84',
            label:'normal one',
            data: [
                [[10, 0], [13, 5]]
            ]
        },
        {
            color:'23641E',
            label: 'modified',
            data: 
        }
    ], 
    {
        xaxis: {
            mode:"time",
            timeformat: "%d/%m/%y"
        },
        grid: {
            hoverable: true,
            autoHighlight: true
        }
    }
    );
});

Need Your Help

Avoid RePublishing the web application after Eclipse Shutdown

java eclipse web-applications eclipse-3.2

I am having my web application deployed on Tomcat5.5 and I use it in integration with eclipse 3.2.Each time I close the eclipse and restart it, I need to republish the application even when it hasn't

Use java.nio to raise create/move/delete events on file changes

java filesystems nio watch

For a media library where I'd like to update entries when they change in the file system I wanted to give the 'new' java.nio file watching features a try by using this example.