Tabulator: Group counter formatting not working

Created on 8 Jan 2018  路  3Comments  路  Source: olifolkerd/tabulator

The group total formatter doesn't work

{title:"Fee", field:"Fee", formatter:"money", formatterParams:{symbol:"$", precision:2}, bottomCalc:"sum", bottomCalcFormatterParams :{symbol:"$", precision:2}},

This works just fine for the column, but not on the totals row. It totals correctly, but it does not format. No precision or symbol.

Question - Ask On Stack Overflow

Most helpful comment

Hey @codevite

Please ask questions like that on Stack Overflow, the issues list is now only for bugs,

The issue is because your column definition is wrong, you have:

bottomCalcFormatterParams:"money", bottomCalcParams:{thousand:",",symbol:"$",precision:3}

You should be using:

bottomCalcFormatter:"money", bottomCalcFormatterParams:{thousand:",",symbol:"$",precision:3}

I hope that helps,

Cheers

Oli :)

All 3 comments

Hey @AndrewHutcheson

That is because you havnt set the formatter for the column calculation, you need to use the bottomCalcFormatter property:

{title:"Fee", field:"Fee", formatter:"money", formatterParams:{symbol:"$", precision:2}, bottomCalc:"sum", bottomCalcFormatter:"money", bottomCalcFormatterParams :{symbol:"$", precision:2}},

Cheers

Oli

Hi,
Is not working for me:
{title:"Progress", field:"progress", align:"right", width:100, sorter:"number", bottomCalc:"sum",bottomCalcFormatterParams:"money", bottomCalcParams:{thousand:",",symbol:"$",precision:3}},

Whats could be wrong?
Version 4.1

Hey @codevite

Please ask questions like that on Stack Overflow, the issues list is now only for bugs,

The issue is because your column definition is wrong, you have:

bottomCalcFormatterParams:"money", bottomCalcParams:{thousand:",",symbol:"$",precision:3}

You should be using:

bottomCalcFormatter:"money", bottomCalcFormatterParams:{thousand:",",symbol:"$",precision:3}

I hope that helps,

Cheers

Oli :)

Was this page helpful?
0 / 5 - 0 ratings