I'm getting a NaN render for some summaries I have configured for a dynamically added child column:
I'm configuring the column like this:
{
field: newMonthForecastFieldName,
text: 'Forecast<br>$',
type: 'number',
draggable: false,
width: 150,
align: 'center',
region: 'middle',
summaries: [
{
sum(result, record) {
return result + record.newMonthForecastFieldName;
},
renderer: ({sum}) => `Forecast 1: ${sum}`
},
{
sum(result, record) {
return result + record.newMonthForecastFieldName;
},
renderer: ({sum}) => `Forecast 2: ${sum}`
}
]
}
Also, is it possible to apply styling to a summary renderer in the same way you can to a cellElement in a column renderer?
I have attached the ng8 project that reproduces what I'm trying to do.
Thanks
Ben