QCustomPlot Discussion and Comments

Mouse over plot display informationReturn to overview


I'm working on an application that display a large amount of data (EEG and MEG data to be specific), coming from different files.
The image below show an example of what I can have if I load datas coming from 3 different files:

As you can see, it can be a little overcrowded. Even with color, it can be difficult to differentiate them. Each graph comes from a specific file and have a specific label (as seen on the left side of the picture).

I want to add a new feature, but I don't know how to do it, if it's even possible.
When the mouse goes over a graph, I want a small square to appear (near the mouse if possible) with various information about the graph (like it's file and it's name).

Any idea on how to achieve this?

basically you would connect to the QCustomPlot::mouseMove signal. In there ,you would move around a QCPItemText based on the location of the mouse pointer. it's pretty simple. QCPItemText::position gives you a QCPItemPosition which you can change the x and y locations.

for the other part about getting the closest graph, i think you would need to look into QCPGraph::selectTest and basically loop through the graphs to find the closest graph to your mouse location.

Sorry I'm a little late... thanks for your input, I'll look into that!