Feature suggestion for Waveform view: Analysis tool default signal based on mouse position when right-clicking

Hi @Jeremy - I think that the Waveform widget in UI 1.x supports this, but we never updated the range tools to take advantage of this information. See _on_range_tool, which parses the mouse location to determine the default. Here is the value passed to the range tool’s !run action when I click on the voltage plot:

{
  "x_range": [
    250711945197826646,
    250711946153704714
  ],
  "origin": "WaveformWidget:00000001",
  "signals": [
    "JsdrvStreamBuffer:001.JS220-002557.i",
    "JsdrvStreamBuffer:001.JS220-002557.v"
  ],
  "quantity": "v",
  "signal_default": "JsdrvStreamBuffer:001.JS220-002557.v"
}

Note quantity and signal_default.

Your custom range tool(s) as discussed on “Is it possible to add quantities that are calculated from the data to the waveform summary and dual markers?” can use this info to “do the right thing”.

A range tool is free to ignore any or all of this information and pull it’s own. For the range tools we have, I don’t see any value in using signals not being displayed in the Waveform widget.