pivottable.js

pivottable.js

BhavinBhattBhavinBhatt Posts: 27Questions: 9Answers: 0

I'm using pivottable.js library for pivoting data and summarize values.
the output after applying Pivottable functions generates multiple row and column headers with rowspan and colspans.

when I implement DataTable after that it throws error.

Please guide if anyone has idea about this.

Br,
Bhavin.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 21,352Questions: 26Answers: 4,955

    Are you saying that the rows have colspan and rowspan? If so this isn't supported by Datatatbles. Please see the HTML Requirements docs.

    Kevin

  • BhavinBhattBhavinBhatt Posts: 27Questions: 9Answers: 0

    the output is like:

    sample data
    Month-YearMay-2021Jun-2021Jul-2021Aug-2021Totals
    CustomerDrawing

    after applying DataTable it throws erros:
    Uncaught TypeError: Cannot read property 'aDataSort' of undefined
    at X (datatables.min.js:86)
    at wa (datatables.min.js:90)
    at e (datatables.min.js:111)
    at HTMLTableElement.<anonymous> (datatables.min.js:113)
    at Function.each (jquery-3.0.0.js:359)
    at jQuery.fn.init.each (jquery-3.0.0.js:152)
    at jQuery.fn.init.n [as dataTable] (datatables.min.js:103)
    at jQuery.fn.init.h.fn.DataTable (datatables.min.js:185)
    at Object.OnSuccessCall [as success] (QRSP_V1:917)
    at fire (jquery-3.0.0.js:3240)

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    To progress this., please provide a test case or link to your page as requested,

    Colin

  • kthorngrenkthorngren Posts: 21,352Questions: 26Answers: 4,955

    Take a look at this example. It explains the supported way to use complex headers with Datatables. I'm not sure your use of rowspan and colspan meets the requirement of having a unique th to attach the order listeners.

    If you still need help please provide the test case Colin asked for.

    Kevin

Sign In or Register to comment.