Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: How to get average value. How to get average value. #72780

    Mpod Schuzatcky
    Participant

    [SOLVED]
    Finally, i get what i need, thnx Mariya for your inspired reply…. nice to meet u btw…
    View

    I’m modified some code here :

    {
    text: ‘Akurasi Stok WIP Keramik’,
    align: ‘center’,
    datafield: ‘akurasi’,
    filterable: false,
    cellsalign: ‘right’,
    width: 120,
    aggregates: [‘avg’],
    aggregatesrenderer: function (aggregates, column, element, summaryData) {
    var renderstring = “<div style=’padding:5px’>Rerata: “;
    var total = aggregates.avg;
    renderstring += total.toFixed(2);;
    renderstring += ” %</div>”;
    return renderstring;
    }
    },

    Note : How to closed this thread as closed / solved?

    in reply to: How to get average value. How to get average value. #72728

    Mpod Schuzatcky
    Participant

    Thanx for fast respons.
    I’ve seen the demo before, but still confused how to combine in this code below.

    {
    text: ‘Akurasi Stok WIP Keramik’,
    align: ‘center’,
    datafield: ‘akurasi’,
    filterable: false,
    cellsformat: ‘n’,
    cellsalign: ‘right’,
    width: 120,
    aggregates: [
    {
    ‘total’: function (aggregatedValue, currentValue, column, record) {
    return aggregatedValue + currentValue;
    }
    },
    ],
    aggregatesrenderer: function (aggregates, column, element, summaryData) {
    var renderstring = “<div style=’padding:5px’>”;
    var total = aggregates.total;
    renderstring += total;
    renderstring += “</div>”;
    return renderstring;
    }
    },

    can u help how to add code (what i must add) to get average value replace sum value.

Viewing 2 posts - 1 through 2 (of 2 total)