Grafana - duration between two annotations on a graph?

Duration: Ideally would be nice to display duration between two annotations on a graph, but I’ll settle for displaying the duration of the selected window.
Something like ${__from - __to}
Anyone have a good way of doing this? Seems like a pretty common need.

I can do it in a separate panel on the dashboard, but it’s not ideal.

Could you please explain what do you mean by duration between two annotations?

Duration.end - duration.start

You can display duration using Dynamic Text panel for the Time Range, but it will be similar to the datasource example

Annotations has Time and Time End… is it what you mean by duration end and start or something else?

Time End - Time
The duration of the annotation

In any case, I am asking because we just create a Grafana HTTP API Data Source which can retrieve all annotations as Data source

It’s still under review, but maybe it will work for you

That might work… get the user to name their annotations correctly and I could setup a stat panel to do some calculations.