Can data values be formatted? Such as: float_num.toFixed(2);
Specifically, a value of 1.2345 should be rendered as 1.23
Can data values be formatted? Such as: float_num.toFixed(2);
Specifically, a value of 1.2345 should be rendered as 1.23
The documentation is a bit behind. I got it working by reading the code. Example:
on:{
onHeaderInit: function(columns){
for(var i=0; i< columns.length;i++){
columns[i].format = function(t) {
return t && t != "0" ? parseFloat(t).toFixed(2) : t
}
}
}
}
Thank you for posting your solution! We will add information about “onHeaderInit” usage to Pivot docs.