Right Align Numeric Dimensions In Pivot And Table Widgets
Updated 03-02-2023
years ago there was a script posted to automatically right align number columns so users could add, remove, hide, and rearrange their table widget and still get numbers to right align. But that script seems to have stopped working with upgrades
This is what I found. How do we get something that works with tables and piot tables?
/* Right Align numbers in the table */
widget.on('domready', function (a, b) {
_.each ($('td', element), function (td) {
var $td = $(td);
if (!isNaN(parseFloat($td.text()))) {
$td.css({ 'text-align': 'right' });
}
});
});