Home Forums Chart Support Show ToolTip only when over or close to datapoint

Show ToolTip only when over or close to datapoint

Viewing 6 posts - 1 through 6 (of 6 total)
  • #22443

    In the fiddle below, if the mouse is over a datapoint then the tooltip is shown.
    Now move the ouse out of the canvas and then bring it anywhere inside the canvas area, the tooltip is still seen even if mouse is not over any datapoint.
    https://jsfiddle.net/QwZuf/2328/

    Can this behaviour be changed to having the tooltip be shown only if its over or very close to the datapoint

    #22457

    @himanshu_tanwar,

    The toolTip will be shown for a dataPoint when you hover on it and continue to move the mouse inside the plotArea (the toolTip content changes according to the dataPoints).

    Once you hover on a dataPoint and then move out of plotArea and again getting the mouse on plotArea will not show toolTip, unless you move closer to or hover on particular dataPoint.

    __
    Priyanka M S
    Team CanvasJS

    #22458

    if you set toolTip shared property to true, then the tooltip will be shown whenever the mouse is in the plotarea

    #22465

    @himanshu_tanwar,

    shared toolTip is recommended for multi-series charts and not for a single series chart.
    In case of the shared tooltip, as it is shared among multiple dataPoints, the toolTip is designed to be shown based on nearest x-values irrespective of y-values and chart-type, whenever you mouseover plotArea.

    __
    Priyanka M S
    Team CanvasJS

    #22469

    so in the fiddle given initially, if the last 3 datapoints have values for y as null, then if you hover over the last datapoint the tooltip is shown for it, and after that on hovering anywhere on the right side of the chart, the tooltip is preserved.
    Is there any way to not show the tooltip in those cases.

    To put it simply, can the tooltip be shown only when the mouse is over the datapoint?

    #22471

    @himanshu_tanwar,

    can the tooltip be shown only when the mouse is over the datapoint?

    Tooltip will be shown only when mouse is hovered or near to the dataPoint, when shared property is not set / set to false (defaults to false). But if shared property is set to true, toolTip is shown when you mouse hover the plotArea i.e. the region where dataPoints are rendered.

    In the JSFiddle that you have shared, it seems to be working as briefed above.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.