Home forums Using CanvasJS Adding Event Listeners To StripLines

This topic contains 3 replies, has 3 voices, and was last updated by  Bivek Singh 5 months, 3 weeks ago.

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

    Ryan
    Member

    I would like to find out if there is a way I could attach event listener to stripline objects.

    I know there is already an example of listening to the canvas and update stripline location
    http://jsfiddle.net/canvasjs/Lz9198ds/

    But what if I would like to multiple draggable striplines on the chart.

    Also, is it possible to add id to striplines?

    Thanks in advance.

    #17252

    Suyash Singh
    Moderator

    @singulariti,

    [update]

    We have just released v2.0 GA with crosshair, 5 new chart types & several other features. Please refer the release blog for more information & let us know your feedback.

    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

    #17396

    Ryan
    Member

    Hi Suyash,

    Thanks for the reply.
    I would also like to know if I can set the stripline height?
    I understand stripLines’ thickness can be changed, but I can’t seem to alter stripLine’s total length in y direction.

    Thanks in advance.

    #17397

    Bivek Singh
    Participant

    Ryan,

    Sorry, controlling height of stripline is not available as of now.

    —-
    Bivek Singh,
    Team CanvasJS

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

You must be logged in to reply to this topic.