Forum Discussion
Hi cartercjb
Unfortunately, you can't use JQuery to customize "per-row" attributes (as they use the same class name.
Saying that, you can use the following code to do so...
Start off by adding the following code to your widget (prior to your code):
function getWidgetDocumentObject(widget) {
// This function determines the document object context (different when in a widget-view or a dashboard-view mode)
if (prism.activeWidget == null)
return document.querySelector('[widgetid="' + widget.oid + '"]');
else
return document;
}
Next, use a code similar to the below to control per-cell attributes:
widget.on('domready', function(widget) {
doc = getWidgetDocumentObject(widget);
document.querySelector('#pivot_').querySelectorAll('.p-total-row-val')[0].style.background = 'red'
});
Note - You can use loops (e.g., forEach) and attributes (.length) to generalize your code