Home Forums Chart Support How to use fixed Y axis 0-100% Reply To: How to use fixed Y axis 0-100%

#30525

Got the solution with some changes in for Loop.

 let a = [];
  chart.options.data.forEach((val, i)=>{
    //alert(JSON.stringify(val), i);
    val.dataPoints.forEach((val2)=>{
      a.push(val2.y)
    })
  })
  maxY = Math.max(...a);
  console.log(maxY, a)