Home › forums › Chart Support › Place image over CanvasJS
Tagged: image, over graph, responsive, scatter
I was just wondering if it is possible to place an image over CanvasJS (over a scatter graph) and make it responsive to screens?
Please take a look at this JSFiddle. Also refer our documentation for tutorial on positioning images over charts.
Thank you for your reply.
I was just wondering if it is possible to place image over the whole canvas, and not just the markers?
If you are trying to add background image to chart, you can add background-image to chart-container and set chart backgroundColor to transparent as shown in this JSFiddle. Or if you like to position image on-top of chart with defined width and position, you can add custom image and position with the help of CSS properties as shown in this tutorial.
Do you think if there is any option to create something like this: https://jsfiddle.net/5k60djuL/ , and make the apple image responsive to size, rather than fixed?
Updating the width of image on resizing the window should work fine in your case. Please take a look at this updated JSFiddle.
You must be logged in to reply to this topic.