javascript - Call function after highchart is loaded Ember.js -


i need set boxes on same height. i've done have problem highcharts. it's loading after function , when it`s loaded in boxes have half chart.

how can call function after highcharts loaded?

import ember 'ember';  export default ember.component.extend({     /**      * equal heights of each box wrapper      */     sameheight: ember.run.schedule('afterrender', function () {          let boxes = document.getelementsbyclassname("box");         var tallest = 0;          // loop on matching , finding tallest         (let = 0; < boxes.length; i++) {             let elementheight = boxes[i].offsetheight; //get height , width of element, including padding , border             if (elementheight > tallest) {                 tallest = elementheight;             }         }         //add same height         var findclass = document.getelementsbyclassname('box');         (let = 0; < findclass.length; i++) {             findclass[i].style.height = tallest + "px";         }     })  }); 

this function in ember component.

import ember 'ember';  export default ember.component.extend({      sameheight: ember.run.next('afterrender', function () {          let boxes = document.getelementsbyclassname("box");         var tallest = 0;          // loop on matching , finding tallest         (let = 0; < boxes.length; i++) {             let elementheight = boxes[i].offsetheight; //get height , width of element, including padding , border             if (elementheight > tallest) {                 tallest = elementheight;             }         }         //add same height         var findclass = document.getelementsbyclassname('box');         (let = 0; < findclass.length; i++) {             findclass[i].style.height = tallest + "px";         }     })  }); 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -