试图使jquery可视化工作。该表工作良好,标题正在呈现,但图表中没有数据。我学习了这个例子,寻找问题,但没有发现哪里出了问题。控制台中没有任何内容,只有填充图表的数据。在我的网格视图表引起问题之前,我已经缩小了它的规模,并手工编写了一个表,但是结果仍然相同,没有图表。这里的整页,因为它真的没有那么多,请让我知道我搞砸了。
提前感谢
<head>
<title>test chart</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<link href="Content/visualize-dark.css" rel="stylesheet" />
<link href="Content/visualize-light.css" rel="stylesheet" />
<link href="Content/visualize.css" rel="stylesheet" />
<script src="Scripts/visualize.jQuery.js"></script>
<script>
$(document).ready(function () {
$('table').visualize({ type: 'bar' });
});//end ready function
</script>
<body>
<table>
<caption>Test Data</caption>
<thead>
<tr>
<td></td>
<th scope="col">food</th>
<th scope="col">auto</th>
<th scope="col">household</th>
<th scope="col">furniture</th>
<th scope="col">kitchen</th>
<th scope="col">bath</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Mary</th>
<td>190</td>
<td>160</td>
<td>40</td>
<td>120</td>
<td>30</td>
<td>70</td>
</tr>
<tr>
<th scope="row">Tom</th>
<td>3</td>
<td>40</td>
<td>30</td>
<td>45</td>
<td>35</td>
<td>49</td>
</tr>
</tbody>
发布于 2014-02-28 18:52:58
看起来这个特殊的插件不能在1.7.x以上的jQuery版本上工作
在这个演示中,我用1.7.2版本插入了您的代码,它看起来很有效。
https://stackoverflow.com/questions/22102228
复制相似问题