I have a project whereby I would like to represent reports using PivotTable.js library. I have done it before and this time I have simply replicated what I did onto this other project, but when I try to render the contents, I get a bunch of errors.
To try to resolve this, I have simplified the render functionality with a small default example with hard-coded data like below:
try{
$("#output").pivotUI(
[
{color: "blue", shape: "circle"},
{color: "red", shape: "triangle"}
],
{
rows: ["color"],
cols: ["shape"]
}
);
}catch(err){
console.log(err)
}
and here are my links in the <head></head> tag:
<link href="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/pivot.css"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.7.20/c3.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.2.1/d3.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/pivot.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/c3_renderers.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/d3_renderers.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/tips_data.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/export_renderers.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/gchart_renderers.min.js" ></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>
But when I render it returns the following error:
TypeError: $(...).pivotUI is not a function
I have perused all the available links to possible solutions and official docs, but to no avail. I always tend to get one error after the other. I have also tries different version of jQuery but also made not difference. What am I doing wrong?