Totals and Raw Data Table


#1

Hello, i have a requirement for the customer in my dashboard app, the customer wants to see totals in one of our CF Raw data table implementation, reviewing the documentation I noticed that the visualization for that is a Pivot Table , i know that it is possible to access the ag-grid api of an RDT, but I think it would be better if there is a declarative way to do it, my question then is: is it possible to define totals without using a Pivot Table?, i really need this please if you have any suggestion i’m open to new ideas


#2

Hi @ivan95, actually yeah, it is possible, you just need to do this:

.set('columnTotals', [
  {field:'fare', function: 'sum'},
  {field:'tips', function: 'sum'}
])

for more information you can read this: column-totals


#3

Well it works for me and it is just that i wanted, thank you @emoya, maybe i need to pay more attention to the docs. :sweat_smile: