Adding Pivot Tables

How difficult or otherwise would it be to get pivot tables within an Anvil app using http://nicolas.kruchten.com/content/2015/09/jupyter_pivottablejs/ ?

This is one of those things I’ll have a pop at late one night.
Just tried my usual way of loading external libraries in and it failed.

Don’t hold your breath waiting for me, but I’ll post back here with progress when I get a moment.

1 Like

I had a quick go at it and failed. I wasn’t certain if that was simply my ineptitude or whether this might be trickier than I imagined!

If I get a mo, I’ll have another crack at it…

I had a crack at using the underlying javascript library in a custom component. It renders fine in the editor but gives an error when running the app:

[An internal error has occurred]
WARNING: This application uses deprecated jQuery 2.2 features. Please see the Javascript console for more details. Error: jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos

Looks like it isn’t going to work any time soon unless they upgrade the version of jquery they are using.

Update
It’s JQueryUI that causes the problem rather than the pivot table library itself.

I got the basic pivot table demo working within Anvil. My mistake previously was including the js libraries from cdn within the custom form. Once I copied them into theme asset files, all works well.

More work to do on this to pass in data and get it to do something useful, but it’s a start!

2 Likes

I finally got around to doing something about this: