I am getting Month, Target, Target1 values are getting from webservice available in store. I want to calculate the total value and insert the total field value in the same store.
I am doing this for calculation but I don't know how to insert the total value into the total field. Can anybody tell me how to do this?
chartstore.each(function (rec) {
total=parseFloat(rec.get('target'))+parseFloat(rec.get('target1'));
});
Month Target Target1 Total
Jan 25 25 50
Mon 50 50 100