I am looking for some way chart a horizontal line at some value determined by a query. I have a time series line chart showing dB loss values across the time series. There is another index that stores baseline dB loss values for the same locations. I want to draw a horizontal line at the baseline value for the location -- so someone can quickly see if the current scans are pretty close to "as good as it's ever going to get" or if the current scans show a potential problem.
I've tried both Vega and TimeLion (we're using ES7, so MathLion doesn't appear to be an option). In TimeLion, I can use .value(10) to get a horizontal line at 10, so that seemed like a good direction. I just need to populate .value() based on a search instead of a static value. But my attempts haven't yielded anything.
.es(index= db_traces-*, timefield='@timestamp', q='locationname:SampleLocation1', metric='max:KeyEvents.Summary.loss') .label('Total Loss') .title('Loss History') .yaxis(1,position=left) .lines(width=2).color(purple) .fit(none) , .value(.es(index= db_baselines-*, q='locationname:SampleLocation1', metric='max:KeyEvents.Summary.loss')) .lines(width=3) .color(maroon) .label('Baseline Loss')