Pivot Table widget

Our proof-of-concept had a spinoff: I needed to display data similar to what Excel does with a pivot table. So I created a widget and a demo project. Please refer to the widget documentation for screenshots and full details. I learned a great deal about widget creation and I am still working on it. Feedback on functionality as well as coding is welcome! The next version: Allows for column headers that are rotated Runs under Mendix 4.7 as well. (I still hope to use one JavaScript source for both versions.)
6 answers

Version 1.1 is now available, supports rotated column headers (see last screenshot) and runs under Mendix 4 as well as Mendix 5. I tested with 4.7.2 and 5.1.1

Demo project has also been changed to include an example of rotated column headers.


Version 1.2 is now available, the changes:

  • Rearranged the properties into separate categories for X and Y axis configuration.
  • Optionally react to context object changes
  • Sort attribute (id or label) and direction added.
  • The sort now takes the attribute type into account so numbers are sorted on their numerical value like 1, 2, 5, 10, 100

All new properties have a default that makes the widget behave before this update.

Compatible and tested with Mendix 4.7.2 and up.

Demo project changes:

  • Examples changed to use a different sort method and react to context object changes
  • Creating CSS classes for rotated column headers with different dimensions proved quite a challenge because of the math involved. So I added a utility page added to help in creating these.

Demo project tested in Mendix 5.1.1 and 5.2.0


I updated the demo to Mendix 5.3.1 and changed it to play nice in the app cloud. Published and pending approval.


Widget is now on Git. https://github.com/synobsys/mendix-PivotTableWidget

From this version on, the widget is Mendix 5 only and not backwards compatible with earlier releases.


The widget now allows exporting of the table data to CSV. I changed the demo project to show how to implement the new function.

I have also migrated all my widgets to use Dojo AMD.


This is a very nice widget. Unfortunately it does not work on Mendix 6.