javascript - Pentaho CDE Dashboard BI (Auto refresh + Onclick refresh Functionality ) Creates Error in console -


i created dashboard 4 tabs , multiple components(bar graphs, pie charts. tables) on each tabs

i trying show live data on on mysql database ..

auto refresh : - keep rendering components of selected tab 60 secs using

dashboards.update(render_componentname);   

onclick refresh :- have same render call in layout panel java script tab onclick render respective components

i used function resizing component in pre execution

var myself = this; myself.chartdefinition.width = myself.placeholder().width();   if (!this.resizehandlerattached){  var debouncedresize = _.debounce(function(){   myself.placeholder().children().css('visibility','visible');   myself.chartdefinition.width = myself.placeholder().width();   myself.render( myself.query.lastresults() ); }, 200);    $(window).resize(function(){    if ( myself.chartdefinition.width != myself.placeholder().width()){     myself.placeholder().children().css('visibility','hidden');     debouncedresize();   }     });   $("#link1").click(function(){     myself.placeholder().children().css('visibility','hidden');     debouncedresize(); });   this.resizehandlerattached = true;   

so while navigating through tabs getting following error (for each component includes above function)

error :- "uncaught nocachedresults "   

i doubt (as render again onclick javascript in layout panel) may conflicting ..

i getting error in console line of code

code :- myself.render( myself.query.lastresults() );   

i checked cdf-bootstrap-script-includes.js error coming

any example same includes auto refresh + onclick tabs refresh

please me this

thanks in advance ...

solved finally..!!

issue calling same function htmlobject of no use ,component rendering anyways , removed .

updated function

var myself = this; myself.chartdefinition.width = myself.placeholder().width();    if (!this.resizehandlerattached){     var debouncedresize = _.debounce(function(){      myself.placeholder().children().css('visibility','visible');      myself.chartdefinition.width = myself.placeholder().width();      myself.render( myself.query.lastresults() );    }, 200);     $(window).resize(function(){       if ( myself.chartdefinition.width != myself.placeholder().width()){        myself.placeholder().children().css('visibility','hidden');        debouncedresize();      }        });    this.resizehandlerattached = true;  

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -