Hey everyone. I'm developing a feature for a graph control that displays multiple plots over a span of time.
It would be helpful to my user to give some amount of focus or highlight to one of the many plots. I realize there is the plot thickness feature built into the legend with interactive mode turned on. That's great!
However, this graph can run for 4 days and the sample rate tends to be once every 10 seconds. So there's hundreds of thousands of data points. Hence, simply thickening the plot helps, but the user loses resolution.
So I'm experimenting with the ATTR_PLOT_OPACITY feature. So here's what I did:
1) I added a custom control menu item (NewCtrlMenuItem) with its own callback function.
2) In the callback, I set this plotID to be opaque and all other plots to be less (giving a dimmed look).
3) I also set the checkmark for this menu item.
Now the only problem with this approach is that the checkmark in this exclusive OR arrangement is only relevant to one plot ever! So what I really need to do is on the RIGHT_CLICK event, reassess if the plot in question was dimmed before. Otherwise, set up a new single opaque plot and dim the rest.
But, it turns out that GetActiveLegendItem doesn't work on the EVENT_RIGHT_CLICK event for the graph control. Apparently, the legend item isn't "active" until you do a left click / commit on the legend.
Also, I tried the EVENT_INTERACTIVE_LEGEND event, but this to is reserved only for when the user left-clicks (commit).
I'm surprised that GetActiveLegendItem isn't finding the plot that's highlighted. Am I missing another approach?