var dataAP = [65, 104, 83, 83, 83, 78, 67, 83, 90, 76]; var Max= Math.max(...dataPie1) //Max = 104
var Max = dataAP[0]; for(var i = 1; i < dataAP.length; i++) { let cur = dataAP[i]; cur > Max ? Max = cur : null } // Max = 104