Calling a function onchange event on aggregator : pivottalbe.js
<p>I am currently using PivotTable.js to create my reports. The code is as below:</p>

<pre><code>var derivers = $.pivotUtilities.derivers;
var renderers = $.extend($.pivotUtilities.renderers, 
    $.pivotUtilities.gchart_renderers);
var tpl = $.pivotUtilities.aggregatorTemplates; 
$.getJSON("sales.json", function(mps) {
    $("#output").pivotUI(mps, {
        renderers: renderers,
        aggregatorName: "Sum",
        vals: ["Quantity"],
        rendererName: "Table",
        derivedAttributes: {
            "Year": derivers.dateFormat("Invoice Date", "%y"),
            "Month": derivers.dateFormat("Invoice Date", "%n"),
            "Day": derivers.dateFormat("Invoice Date", "%d"),
        }
    });
});
</code></pre>

<p>What I want to do is whenever another aggregator is selected from the Select Box(class="pvtAggregator") I want to change the Text in the Totals column and row(class=pvtTotalLabel")</p>

<p>I tried using the jquery change() method and the jquery when().done() method to dynamically change the contents dynamically. But was unable to do so.</p>

<p>Is there a way I could complete run a function after the entire jquery is executed? Please help.</p>