Home forums Using CanvasJS Draw a line over canvas chart

This topic contains 6 replies, has 2 voices, and was last updated by  Vishwas R 9 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #22783

    Is there any way to draw a line over canvas chart on mouse events?

    #22785

    @prem123,
    Are you looking for something like this.

    Also take a look at gallery example on draggable column chart.


    Vishwas R
    Team CanvasJS

    #22788

    No i don’t want to move Datapoints, i just want to draw a simple line over chart

    #22789

    I just to want to draw a line _______________________________________________ like this

    #22790

    @prem123,

    You can attach mouse events to chart-container and draw line on top of chart-canvas based on mouse events. Please take a look at this JSFiddle where line will be drawn from the coordinates of mousedown and mouseup events.


    Vishwas R
    Team CanvasJS

    #22791

    Is there any way to draw lines using tools supported by Canvas js

    #22797

    @prem123,

    Sorry, drawing on chart is not available as an inbuilt feature in CanvasJS as of now. However with few lines of code, you can achieve it as shown in the JSFiddle shared.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.