Home forums Using CanvasJS Adding Event Listeners To StripLines Reply To: Adding Event Listeners To StripLines

#17252

Suyash Singh
Moderator

@singulariti,

stripLines have a read only property called bounds which gives you the coordinates of the rectangular region bounded by the stripLine. get method can be used to access bounds. You can attach event based on bounds and achieve draggable stripLines. Please check this jsfiddle.

Also, is it possible to add id to striplines?

Yes, you can add custom properties like id in stripLines object.

Also please have a look at crosshair. Its a new feature available in v2.0 Beta which might be useful in your case.


Suyash Singh
Team CanvasJS