小编Vai*_*ass的帖子

未捕获的TypeError:无法读取未定义的属性'arrayToDataTable'

我面临这个错误,不知道为什么会出现这个错误.我正在使用codeigniter,这是jquery错误.

这是我的查看页面

<script>
$(function() {
    $("#accordion").accordion({
        collapsible: true,
        heightStyle: "content"
    });
});

var data = google.visualization.arrayToDataTable([
    ['Attendance Type', 'Count'],
    ['Present', <?php echo $student_attendance_count['present']; ?>],
    ['Absent', <?php echo $student_attendance_count['absent']; ?>],
    ['On Leave', <?php echo $student_attendance_count['leave']; ?>],
    ['Attendance Not Maked', <?php echo $attendance_not_marked; ?>]
]);

var options = {
    title: 'My Daily Activities'
};

var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);
</script>
Run Code Online (Sandbox Code Playgroud)

这是我的HTML页面检查这个以供参考.如果您需要更多详细信息,我将在此处添加.我不知道这个错误是怎么来的.

<div id="accordion">
<h3><span class="accordion_header">Student Strength</span></h3>
<div>
    <table>
        <tr>
            <td>
                <div id="chart_div" style="width: 500px; height: 300px;"></div>
            </td>
            <td style="vertical-align: …
Run Code Online (Sandbox Code Playgroud)

ajax jquery google-visualization

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

ajax ×1

google-visualization ×1

jquery ×1