PerformancePoint Dashboard Render Callback

Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c01/h05/mnt/6385/domains/ on line 65

Doing some JIT branding on a SharePoint 2010 site with bootstrap v2, I needed a way to determine when the PerformancePoint elements on a dashboard had finished loading. PerformancePoint has a problem (or maybe it’s my problem) calculating the width of its components with regard to bootstrap; I fooled it by giving the content area extra margin-left (67px in my case), and then taking it away once all PerformancePoint elements are loaded:

<script type="text/javascript">
    var NotifyBrowserOfAsyncUpdateTimeout = false;

    function NotifyBrowserOfAsyncUpdate(elem) {
        window.console && window.console.log('NotifyBrowserOfAsyncUpdate');
        if (NotifyBrowserOfAsyncUpdateTimeout) {
        NotifyBrowserOfAsyncUpdateTimeout = setTimeout(function() {
            // do some stuff
            jQuery('#MSO_ContentTable').css('margin-left', '0');
            window.console && window.console.log('NotifyBrowserOfAsyncUpdateTimeout');
        }, 100);

I added in the setTimeout/clearTimeout with a nominal 100ms duration, but it probably is not necessary; given some very light testing, by the time the first callback hits, PerformancePoint has correctly calculated the width of its components.