Example of Cell Template in Javascript Pivot Table Control

/
/
Cell Template

In this sample, we demonstrate on how to provide templates for each pivot table value cell based on user requirement.

More Details...

Description

The Pivot Table provides a custom layout for each cell's display using the cell template feature. The cellTemplate property accepts either an HTML string or the element's ID, which can be used to append additional HTML elements in order to showcase each cell with a template. Using cell templates in this sample, we are representing the revenue cost for each year with trend icons. To calculate the trend, we have applied conditions for each cell using pivot values from a dataBound event. Based on the applied condition, we are showing the appropriate trend icons. More information on the cell template can be found in this documentation section.