[Chartjs]-How can i add an image as background in Chartjs?

2👍

You can style the canvas element. Something like this will work

canvas {
    background-color: black;
}

Fiddle – https://jsfiddle.net/w1yhp03h/

6👍

Thank you!

I didn’t think to CSS, i added an image too in a similar way

canvas {
   background-image: url(backgroundimage.jpg);
}

Leave a comment