In onBeforeRender event we want data into third column which is result of division of 1 & 2 column

In onBeforeRender event we want data into third column which is result of division of 1st & 2nd column. In that event operation is working on Async mode. we didn’t get data in 3rd column

Pls refer below code,
(url :- http://webix.com/snippet/e473bb6d)

webix.ui({
  id:"pivot",
  view:"pivot",
  height:400,
  width:1000,
  structure: {
    rows: ["form", "name"],
    columns: ["year"],
    values: [{ name:"gdp", operation:"max"}, { name:"gdp", operation:"min"}]
  },
on:{
    onBeforeRender: function(config){        
      var columns = config.header;
      console.log(columns);
      var gdpID=0;
      var gdpValue=[];
      
      
      for(var i=0; i< columns.length;i++){  
        
        if (columns[i].id.match(/_oil/i)){
          var abc=0;
          console.log("i :"+i);
          console.log("gdpID :"+gdpID);
          
          
          columns[gdpID].template = function(obj, common, value) {            
              gdpValue.push(value);  
            console.log("gdpValue :"+gdpValue);
            
          }
          
          console.log("gdpValue123 :"+gdpValue);
            var p=0;
        	columns[i].template = function(obj, common, value) {            
              //console.log("abc2 :"+gdpValue.get[p]);
              console.log("p :"+p);
              value=parseInt(value)/parseInt(p);
              p++;
	          return value;
          }
       	}
      }
      
    }
  },
  data:pivot_dataset
});

Kindly reply …

In addition to the previous solution, there’s a possibility to add math functions to the column as follows: http://webix.com/snippet/5db29122