Results 1 to 4 of 4

Thread: scatter graph - display tooltip only onClick and hide when loosing focus

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    20
    Vote Rating
    0
      0  

    Default scatter graph - display tooltip only onClick and hide when loosing focus

    Hi
    I've been as to show tooltip on a scatter graph dot.
    however i need to show the tooltip only when user clicking on the dot but hide it when he is out of focus(like normal tooltip)

    I've tried in the "onSeriesSelection" to add tooltip config and use showAt(x,y);
    (this only work on the second click)
    however the tooltip configuration remain (from now on the tooltip show as usual on hover)
    then after the showAt, i've add the remove tooltip from scatter method.
    however the clickable tooltip still display (unless i press the close button i've added to the tooltip). - i guess this is because i don't have a tooltip object anymore.

    Is there another way to do it ?

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Answers
    109
    Vote Rating
    93
      0  

    Default

    When you explicitly call showAt on the tooltip, you are taking responsibility for its lifecycle - in other words, you need to call hide when it is time to go. In this case, listen for the mouseout (i.e. spriteout event) from the point that the user clicked on.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    20
    Vote Rating
    0
      0  

    Default

    Note that this graph should be dynamic, meaning number of series may change.
    Also that the x axis is a category axis

  4. #4
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Answers
    109
    Vote Rating
    93
      0  

    Default

    Tooltip functionality does not change at all by adding more series to the chart. With multiple series, the events I mentioned will still work.

    What have you tried? Can you share a code sample that does what I suggested by still doesn't work?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •