Limit decimal places in Dash AG Grid

Hi,

I have a column in a grid with numbers (eg: 1.56789). How can I limit it to a certain number of decimal points?

Can you try to use valueFormatter in your code. Something as below:

columnDefs = [{
    'field': 'col2',
    'valueFormatter': {"function":"""d3.format(",.5f")(params.value)"""}}]
3 Likes