Loading...
 
Skip to main content

History: PluginPivotTable

Preview of version: 42

Plugin PivotTable

Introduced in Tiki 16.2

Use this wiki plugin to create dashboards with summaries of data in Tiki objects through the unified search index to produce a pivot table report of your choice. Initially this plugin works with tracker data, but other Tiki objects can be connected later with this plugin. Results for the variables of interest (tracker fields, as well as creation_date, modification_date and tracker_status of the items) are aggregated by criteria selected by the user.

It produces the JavaScript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation from Nicolas Kruchten with drag'n'drop (see the list of changes in each version).

Parameters

Plugin Manager error: pivottable plugin not found


Notes on aggregateDetails:

  • The aggregateDetails accepts multiple field names or permNames separated by colon.
  • The aggregateDetails parameter is also enabled by default and can be disabled setting aggregateDetails to an empty string.
  • Each item has the associated object_link available by default and clickable in the popup where the aggregateDetails field data is shown.
    • It will work with other unified search index content entries (not only tracker items) but might be slow for large result sets.
    • It is only activated if aggregateDetails is not disabled. Therefore, there is a workaround to disable this feature for large sets of data (e.g. containing several or hundreds of thousands of items).

Basic Usage

Basic usage requires just to provide the data source (e.g. a tracker with id 1: "tracker:1" since Tiki16, or activitystream also since Tiki19 ), and the rest will be taken as default values by the pivot table plugin, and you will be able to edit it through the PivotTable UI itself. That will allow you to display all field names of the tracker, and will let you drag and drop them in rows or columns of the pivot table editor.

That will cover most use cases. However, if your dataset is huge, or the tracker has many fields, and some of them carrying heavy data (long text fields, or big files/images attached to the tracker items in files tracker fields), you can use an advanced syntax to filter the number of items or reduce the amount of tracker fields exposed to the pivot table to work with, so that performance of the pivot table plugin is fast again. See below for "Advanced Usage"

Example 1

After installing the Bug_Tracker_16 profile on a brand new Tiki 16, you will get a new tracker with id 1 to hold the data of the bug reports/issue tickets. When you add a few dozen items, you can use some syntax like the one indicated below to produce some demo pivot tables table with default values as a starting point, to let you start reviewing the data as wiki-wiki (quick) as possible.

This code:

Copy to clipboard
{pivottable data="tracker:1"}


Would produce with the data from that profile (at the time of this writing):

Click to expand
Click to expand


Once saved, you can click on any cell of the pivottable report, and you will be shown a popup with the information tracker items that produced the count for that cel, with a link to view the full record of each of the tracker items.

Click to expand
Click to expand


From there we can edit the Pivottable again through the PivotTable UI itself, and modify the variables to be used as row or column data, or add new variables in columns, change the type of table or chart produced, etc.

A table can even consider more than one value in a single dimension. The following example therefore uses both Status and Priority on the horizontal axis (meaning a column can have subcolumns):

Click to expand
Click to expand

Example 2

A default configuration for each parameter of the plugin can also be specified. For instance, the values considered in both dimensions can be specified, using the rows and cols parameters, as in the following example (which considers 2 values on the horizontal axis, as in the previous screenshot).

This code:

Copy to clipboard
{PIVOTTABLE(data="tracker:1" width="100%" height="500px" rows="bug_tracker_severity" cols="bug_tracker_bug_status:bug_tracker_priority" rendererName="Heatmap" aggregatorName="Count as Fraction of Columns" vals="bug_tracker_priority")} {PIVOTTABLE}


Would produce with the data from that profile (at the time of this writing):

Click to expand
Click to expand

Example 3

You can also make some charts:

  • Line Chart
  • Bar Chart
  • Stacked Bar Chart
  • Area Chart
  • Scatter Chart


For instance...

This code:

Copy to clipboard
{PIVOTTABLE(data="tracker:1" width="400px" height="300px" rows="bug_tracker_severity" cols="bug_tracker_bug_status" rendererName="Stacked Bar Chart" aggregatorName="Count")} {PIVOTTABLE}


Would produce:

Click to expand
Click to expand

Example 4 (subtotals since Tiki 1😎

Since Tiki18 new renderers were added to allow displaying subtotal sums for rows in the table, through the addition of subtotal.js to the plugin:

  • Table With Subtotal
  • Table With Subtotal Bar Chart
  • Table With Subtotal Heatmap
  • Table With Subtotal Row Heatmap
  • Table With Subtotal Col Heatmap

Click to expand
Click to expand


If you click on the triangle at the left of each row name ("Severity" values, in this example), you will get the options of the next column ("Bug Status", in this example) contracted, hiding the different values of this other column, and showing only the subtotals for the field where you first clicked at (a "severity" value, or the whole column "Severity").

Click to expand
Click to expand

Example 5 (activity stream since Tiki19)

Since Tiki19, you can display data from the Activity Stream into the Plugin PivotTable.

Minimum syntax to let the user choose options throught the PivotTable UI:

Copy to clipboard
{pivottable data="activitystream"}


Example:

Copy to clipboard
{pivottable data="activitystream" rows="object:type" cols="modification_date" width="100%" height="1000px" rendererName="Bar Chart" aggregatorName="Count" inclusions="{}" menuLimit="500" aggregateDetails="object_type"}

Advanced Usage

If your dataset is huge (many thousands), or the tracker has many fields (many hundreds), and some of them carrying heavy data (long text fields, or big files/images attached to the tracker items in files tracker fields), you can use an advanced syntax to filter the number of items or reduce the amount of tracker fields exposed to the pivot table to work with, so that the good performance of the pivot table plugin is preserved.

You can use the filter or display commands (both from PluginList ) to indicate which items (filter) or tracker fields (display) you want to use, respectively, in the pivot table plugin.

See:

Add creation_date, modification_date and status

You can also indicate if you want the creation_date, modification_date and status if the tracker items to be displayed as optional variables to be used in the report.

Copy to clipboard
{display name="creation_date" format="datetime"} {display name="modification_date" format="datetime"} {display name="tracker_status"}

Customize aggregation date values

You can also customize the date format of these dates to show only the date, not the time, for instance, And also:

  • only the day number of the month with %d , or
  • only the day number of the year with %z , or
  • only or the week number of the year with %W , or
  • only the month number with %m , or
  • only the year with %Y , etc

This way, you can get the aggregated values of interest for your report.

Example of code to display only the month number from these dates so that you can draw charts with counts per month, etc:

Copy to clipboard
{display name="creation_date" format="date" dateFormat="%m"} {display name="modification_date" format="date" dateFormat="%m"}


Full list of codes available here:
http://php.net/manual/en/function.date.php

Advanced Example 1


This code:

Copy to clipboard
{PIVOTTABLE(data="tracker:4" rows="bug_tracker_submitted_by:bug_tracker_severity:" cols="bug_tracker_bug_status:bug_tracker_priority:" rendererName="Heatmap" aggregatorName="Count as Fraction of Total")} {display name="tracker_field_bug_tracker_submitted_by" default=""} {display name="tracker_field_bug_tracker_severity" default=""} {display name="tracker_field_bug_tracker_bug_status" default=""} {display name="tracker_field_bug_tracker_priority" default=""} {display name="tracker_field_bug_tracker_version" default=""} {PIVOTTABLE}


Would produce with the data from that profile (at the time of this writing):

Click to expand
Click to expand


And once you click at the Edit Pivot Table button, you would see the controls to edit variable selection, but notice that you have less amount of variables to choose from than before; only the ones you have selected in the display commands of the plugin body above:

Click to expand
Click to expand

Advanced example 2

This code:

Copy to clipboard
{PIVOTTABLE(data="tracker:4" rows="bug_tracker_submitted_by:bug_tracker_severity:" cols="bug_tracker_bug_status:bug_tracker_priority:" rendererName="Heatmap" aggregatorName="Count as Fraction of Total")} {filter field="tracker_field_bug_tracker_bug_status" content="new"} {display name="tracker_field_bug_tracker_submitted_by" default=""} {display name="tracker_field_bug_tracker_severity" default=""} {display name="tracker_field_bug_tracker_bug_status" default=""} {display name="tracker_field_bug_tracker_priority" default=""} {display name="tracker_field_bug_tracker_version" default=""} {PIVOTTABLE}


Would produce the same as before, but restricting the data set to only those items tagged as new bugs (bug status is "new"):

Click to expand
Click to expand


Again, if you edit the pivot table, you will see that also have the restricted the number of fields, as well as the data points, that comply with your filtering criteria:

Click to expand
Click to expand


Advanced example 3

Since Tiki 16.2, any plugin using unified index search formatter and wikibuilder (aka filter, output, display, format, etc. wiki syntax, such as PluginPivottable ) now accepts {filter field=... editable=...} syntax to allow user enter a search value instead of hard-coding it. This means a trackerfilter-like functionality for unified index-based plugins.

You can see this feature in action if you apply profile Bug_Tracker_16

Therefore, this code:

Copy to clipboard
{PIVOTTABLE(data="tracker:4" rows="bug_tracker_severity" cols="bug_tracker_bug_status" rendererName="Heatmap" aggregatorName="Count")} {filter field="tracker_field_bug_tracker_priority" editable="content"} {filter field="tracker_field_bug_tracker_assignee" editable="content"} {filter field="tracker_field_bug_tracker_summary" editable="content"} {PIVOTTABLE}


Would produce the expected pivottable report, with some fields on top to allow the user to filter results before re-drawing the table or chart:

Click to expand
Click to expand

Aliases

Plugin Pivot Table | Plugin PivotTable | PluginPivot Table | Pivot Table | PivotTable | Plugin Pivot Tables | Plugin PivotTables | PluginPivot Tables | Pivot Tables | PivotTables | Plugin Data Pilot | Plugin DataPilot | PluginData Pilot | Data Pilot | Data Pilot |

History

Advanced
Information Version
lindon 48
Marc Laporte 47
Marc Laporte 46
Marc Laporte 45
Marc Laporte Moving to own page 44
Marc Laporte 43
Marc Laporte 42
Marc Laporte AutoTOC 41
Xavier de Pedro 40
Xavier de Pedro 39
luciash d' being 🧙 38
Xavier de Pedro 37
Gary Cunningham-Lee Gave first paragraphs "lead" style; minor text edits. 36
Xavier de Pedro 35
Xavier de Pedro 34
Xavi (as xavidp - admin) Mass search and replace 33
Xavi (as xavidp - admin) Mass search and replace 32
Xavi (as xavidp - admin) Mass search and replace 31
Xavi (as xavidp - admin) Mass search and replace 30
Xavi (as xavidp - admin) Mass search and replace 29
Xavi (as xavidp - admin) Mass search and replace 28
Xavi (as xavidp - admin) Mass search and replace 27
Xavi (as xavidp - admin) Mass search and replace 26
Marc Laporte Edit restored by rescue script 2017-04-24T18:09:12+00:00 25
luciash d' being 🧙 Edit restored by rescue script 2017-04-24T18:09:12+00:00 24
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 23
Philippe Cloutier Edit restored by rescue script 2017-04-24T18:09:12+00:00 22
Philippe Cloutier Edit restored by rescue script 2017-04-24T18:09:12+00:00 21
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 20
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 19
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 18
Xavi (as xavidp - admin) Edit restored by rescue script 2017-04-24T18:09:12+00:00 17
Xavi (as xavidp - admin) Edit restored by rescue script 2017-04-24T18:09:12+00:00 16
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 15
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 14
Xavier de Pedro Edit restored by rescue script 2017-04-24T18:09:12+00:00 13
Xavier de Pedro 12
Marc Laporte 11
Marc Laporte 10
Xavier de Pedro 9
Xavier de Pedro 8
Xavier de Pedro 7
Xavier de Pedro thanks Luciash! (sorry for the edition conflict, I had no idea it had happened) 6
Marc Laporte 5
Xavier de Pedro 4
luciash d' being 🧙 3
Xavier de Pedro 2
Xavier de Pedro 1

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 50😎
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki