SOURCE

let dataY = [1,0,0,0,0, 51, 0, 0, 0, 0, 0, 0];
    
function initMax(dataY){
  let max = Math.max.apply(Math,dataY);
  let index = Math.ceil(max/50);
  return index*50;
}

console.log(initMax(dataY))
console 命令行工具 X clear

                    
>
console