Home forums Using CanvasJS Place image over CanvasJS

This topic contains 5 replies, has 2 voices, and was last updated by  Vishwas R 1 month, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23018

    john
    Member

    Hey!

    I was just wondering if it is possible to place an image over CanvasJS (over a scatter graph) and make it responsive to screens?

    Thank you.

    #23032

    Vishwas R
    Keymaster

    @maksim-ivanov,

    Please take a look at this JSFiddle. Also refer our documentation for tutorial on positioning images over charts.


    Vishwas R
    Team CanvasJS

    #23036

    john
    Member

    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?

    Thank you.
    Maksim

    #23051

    Vishwas R
    Keymaster

    Maksim,

    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.


    Vishwas R
    Team CanvasJS

    #23077

    john
    Member

    Thank you for your reply.

    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?

    #23088

    Vishwas R
    Keymaster

    Maksim,

    Updating the width of image on resizing the window should work fine in your case. Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.