[vtk-developers] Possible mouse-over event in ChartXY?
Eric E. Monson
emonson at cs.duke.edu
Mon Feb 4 09:29:31 EST 2013
Hey Marcus,
Thanks for getting back to me about this. As we've both mentioned, performance should be a deciding factor, but if that doesn't give too much of a hit, it would be a really useful feature, I think. And, yes, if the hover event gets implemented, we would need a getter for the last event data for Python.
I've used a custom tooltip before, and that works well, but I'm trying to avoid it for this particular application. I appreciate the reference to MongoChem – I knew you guys were pursuing chemistry rendering, but hadn't seen the whole Open Chemistry project, and I'll take a look at MongoChem to check out your implementation details. (I've been using MongoDB off and on here to good result, too.)
I understand you're traveling, but if we could get back to this after you return I would appreciate it.
Thanks a lot,
-Eric
On Jan 28, 2013, at 3:48 PM, Marcus D. Hanwell <marcus.hanwell at kitware.com> wrote:
> Hi Eric,
>
> On Thu, Jan 10, 2013 at 11:09 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>> Hey Marcus,
>>
>> Have you guys considered adding an event (maybe a UserEvent) in the XY charts on plot point mouse-over?
>
> We have been talking about some additional events in the charts, and
> this sounds like a reasonable one. My fear would be performance, as
> you point out (but I haven't benchmarked this, and the mouse over code
> has performance issues already - I think this is largely in the search
> rather than any resulting actions).
>>
>> I don't know if invoking a lot of events on a chart that has a huge number of points would hurt performance, but I have an application where it's inconvenient to use custom classes, so instead of a custom tooltip I'd prefer to watch for a mouse-over event and update a separate panel in my GUI with info about the moused-over point. (The info often includes images or other things I can't put into the default tooltip).
>
> You can just set a derived vtkToolTipItem class, I can point you to
> where we do this in the MongoChem project if that is of interest. The
> chart will then update the item whenever a mouse over occurs (and
> attempt to show/hide at the appropriate time).
>>
>> Since you still can't read the data passed along with an event when using the Python wrappings, it would also be handy if the vtkChartPlotData were a get-able property that I could query when the event is observed.
>>
>> Let me know what you think when you get a chance.
>
> Sorry - it took me a while to get the chance ;-) It's a shame that
> Python has no way to get at the data, I would love a stronger signal
> slot mechanism that could be wrapped in Python effectively. If this
> would be helpful we can probably add a getter that would refer to the
> last event.
>
> I am preparing for travel, and so I am not certain exactly when I will
> be able to get to this but I should be able to look at some of these
> items.
>
> Thanks,
>
> Marcus
More information about the vtk-developers
mailing list