我已经在我的web应用程序上集成了PivotTable.js。数据透视表可以正常显示,但是在第一列和第一行中,函数是写的,它没有被解释(见屏幕截图)这是一个写的函数的例子:
function each(iterator, context) {
var index = 0;
try {
this._each(function(value) {
iterator.call(context, value, index++);
});
} catch (e) {
if (e != $break) throw e;
}
return this;
}下面是从结果中截取的截图:
这是我的代码:
<script type="text/javascript" src="./jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="./jquery-ui.min.js"></script>
<script type="text/javascript" src="./jquery.ui.touch-punch.min.js"></script>
<script type="text/javascript" src="./pivot.min.js"></script>
<script type="text/javascript" src="./tips_data.min.js"></script>
<link rel="stylesheet" href="./pivot.min.css">
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
$("#output").pivotUI(
$.pivotUtilities.tipsData, {
rows: ["sex", "smoker"],
cols: ["day", "time"],
vals: ["tip", "total_bill"],
aggregatorName: "Sum over Sum",
rendererName: "Heatmap"
});
});
</script>
<div id="output"></div>发布于 2020-04-16 23:40:32
在这里官方引用了THe问题:https://github.com/nicolaskruchten/pivottable/issues/708
据我所知,目前还没有现成的解决方案。
https://stackoverflow.com/questions/57855474
复制相似问题