Home forums Using CanvasJS Draw an arrow on a graph

This topic contains 3 replies, has 2 voices, and was last updated by  Emeric 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #15316


    Hello !

    I have a problem:
    I have a graph with 2 markers (i can move them by drag & drop) and I would like to see the distance with an arrow between them. I have that at the moment (and have the distance in the console):

    I drew an arrow in canvas:

    But I don’t know how to add her to my graph in order to see it between my markers.
    Do some one have an idea in order to help me ?

    Thank you in advance !



    Is that possible ?


    Bivek Singh


    You can get the context of canvas using chart.ctx as shown in this example. However, re-rendering the chart will clear user drawn shapes. So, it would be better to just overlay another transparent canvas on top of chart and draw on it instead.

    Bivek Singh,
    Team CanvasJS



    That’s perfect thank you !

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

You must be logged in to reply to this topic.