Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
How to resolve PivotTable.js initialization error

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?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!