Convert decimal values in array to percentages and pass all values into graph

0๐Ÿ‘

โœ…

I dont know where your yAxisValue comes from but if your data is always in your trainingInit variable you can write your data entry for your chart as this:

datasets: [{
  label: 'Training',
  data: trainingInit.map((val) => (val*100))
  fill: false,
  borderColor: 'rgb(0, 119, 182)',
  backgroundColor: 'rgb(0, 119, 182)',
}]

Leave a comment