0

我会建立一个从表格中给出的条形图。

我尝试使用此示例,但我的页面中只得到一个表格。

这是我的代码:

<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
    <thead>
        <tr>            
             <th>Total des Alertes </th>
             <th>Nombre critique</th>
                 <th>Nom d'analyste</th>
            <th>Nombre majeur</th>
            <th>Nombre d'alertes traités</th>

        </tr>
    </thead>
    <tbody>

     {% for liste10 in listes %}

        <tr class="gradeU">
        <td>{{listes11}}</td>
        <td>{{liste10.critique}}</td>
            <td>{{liste10.user_name}} </td>
        <td>{{liste10.majeur}}</td>

        <td> </td>

    </tr>
        {% endfor %}

    </tbody>


</table>
4

1 回答 1

0

你将不得不导入jqueryVisualize.jQuery.js库,然后把它写在你的文件中

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<script type="text/javascript" src="http://dwpe.googlecode.com/svn-history/r12/trunk/charting/js/visualize.jQuery.js"></script>
<script>
$(function(){
   $('table').visualize();
});
</script>
于 2012-11-10T12:24:51.167 回答