[vtkusers] How to get information of Tooltip of vtkChartXY

shantanu choudhary choudhary.shantanu at gmail.com
Mon Feb 7 12:10:19 EST 2011


On Mon, Feb 7, 2011 at 8:31 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:
Hello all,
>
Thank you Eric for such a prompt reply.
> Right now I think the only way to access this information is to subclass vtkChartXY and override SetTooltipInfo to feed the information to another class. The coordinates displayed are never stored internally to the ChartXY, they are only stored in the vtkTooltipItem as text. Of course, in your chart subclass you could store the most recent coordinates in the SetTooltipInfo method and add get/set methods for those variables. You can also subclass vtkTooltipItem and then in your chart subclass set this new type as the the chart's tooltip, and internally you can do whatever you want with the information that's been passed to it from the chart during the hover.
Okay, I was thinking that somehow I would be able to avoid it. I will
give it a try. We can have a simple, GetTooltipinfo too. I can submit
a patch wrt that, if it appears useful to others too.

-- 
Regards
Shantanu Choudhary



More information about the vtkusers mailing list