Home forums Using CanvasJS Syncing crosshairs on multiple charts

This topic contains 1 reply, has 2 voices, and was last updated by  Vishwas R 1 week, 4 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17854

    chartguy
    Member

    Curious if there is a way to sync crosshairs or tooltips across multiple charts?

    Thanks!

    #17855

    Vishwas R
    Keymaster

    @chartguy,

    You can sync crosshair & toolTips across charts by getting the pixel co-ordinates from the first chart & then triggering an event in second chart and so on. You can use convertValueToPixel() and convertPixelToValue() methods to get the pixel co-ordinates & corresponding values. Here is a jsfiddle for the same. Please note that there may be a slight variation in x-value as pixel co-ordinates are used.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.