Home Forums Chart Support Place image over CanvasJS Reply To: Place image over CanvasJS



If you are trying to add background image to chart, you can add background-image to the chart-container and set chart backgroundColor to transparent. Below is the code-snippet.

<div id="chartContainer" style="height: 300px; width: 100%; background-image:url('https://canvasjs.com/wp-content/uploads/2021/03/background-image-for-chart.jpg');"></div>

Please take a look at this JSFiddle for complete code.
chart with background image

Or if you like to position image on-top of chart with defined width and position, you can add image and position with the help of CSS properties as shown in this tutorial.

Vishwas R
Team CanvasJS