Home forums Using CanvasJS Two different size charts with same crosshair

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

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #22793

    Niladri
    Member

    http://jsfiddle.net/o5pa3rmz/
    but on giving same height of the chart. this thing is working properly

    #22795

    Vishwas R
    Keymaster

    @niladri,

    Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

    #22799

    Niladri
    Member

    i followed your example and When moving the crosshair the position is visible only when i am on the lower portion of the upper chart at height equal to height of lower chart.
    You can see the issue here: https://imgur.com/gDviB8J.

    #22801

    Vishwas R
    Keymaster

    @niladri,

    Handling the ratio of the chart’s height and firing event at proper pixel co-ordinate should work fine in this case. Please take a look at this updated JSFiddle.
    Sync Tooltip and Crosshair across Multiple Charts - CanvasJS JavaScript Charts


    Vishwas R
    Team CanvasJS

    #22803

    Niladri
    Member

    Thank you for your help.
    One last query, is there anything by which the y axis will be in straight line irrespective of y axis values.

    #22827

    Niladri
    Member

    Referring to previous post i would like the axis to match up vertically as shown in this picture

    View post on imgur.com


    Currently the output is like this

    View post on imgur.com

    #22835

    Vishwas R
    Keymaster

    @niladri,

    With the help of margin, you can align axisY (primary or secondary) of multiple charts. Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

    #22838

    Niladri
    Member

    You have show it for Y axis(left side) but i want it for secondary y axis(right side). Your given code is not working for secondary y axis

    #22839

    Niladri
    Member

    As per your last conversation about crosshair
    https://jsfiddle.net/canvasjs/o5pa3rmz/2/

    But when i open the developer tool or when i write anything above the chart the crosshair problem is showing again
    link:- https://imgur.com/4kT8bZl

    Actually i will place this chart in a Draggable Modal.
    So your help will be appreciable.

    #22842

    Vishwas R
    Keymaster

    @niladri,

    You have show it for Y axis(left side) but i want it for secondary y axis(right side). Your given code is not working for secondary y axis

    Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

    #22866

    Niladri
    Member

    Thank @vishwas R for your help.
    If you can solve my last problem it will be very much helpful for me.

    As per your last conversation about crosshair
    https://jsfiddle.net/canvasjs/o5pa3rmz/2/

    But when i open the developer tool or when i write anything above the chart the crosshair problem is showing again
    link:- https://imgur.com/4kT8bZl

    Actually i will place this chart in a Draggable Modal.
    So your help will be appreciable.

    #22926

    Priyanka M S
    Member

    @niladri,

    We are looking into it and will get back to you at the earliest.

    __
    Priyanka M S
    Team CanvasJS

    #22971

    Vishwas R
    Keymaster

    @niladri,

    Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.