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 2 weeks, 5 days ago.
Is there any way to draw a line over canvas chart on mouse events?
Are you looking for something like this.
Also take a look at gallery example on draggable column chart.
No i don’t want to move Datapoints, i just want to draw a simple line over chart
I just to want to draw a line _______________________________________________ like this
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.
Is there any way to draw lines using tools supported by Canvas js
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.
You must be logged in to reply to this topic.