How to add CSS to chartJS Image point style?

Viewed 418

I have images that come in rectangle shape and I want to style them to circles to be put on a chart/canvas- line chart points. I put the css on the image but it doesn't work. I don't actually see the image tags in the generated html so that's probably why the css doesn't do anything. Is there a way to style the images?

let yourImage = new Image()
    yourImage.src ='https://abc.google.com/people/'+id+'/avatar';
    yourImage.className = 'yourImageAvatar';
    imageArr.push(yourImage);
  });

  respData.datasets = [
    {
      label: 'test',
      data: dataArr,
      pointRadius: [10, 0, 0, 10],
      pointHoverRadius: 20,
      pointHitRadius: 20,
      pointStyle: imageArr, <-- here
      pointBackgroundColor: "rgb(255,194,25)",
      fill: false,
      showLine: false,
      backgroundColor: '#ffffff',

    }
0 Answers
Related