Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Threshold Lines in Charts #5037

Closed
stormpython opened this issue Sep 25, 2015 · 22 comments · Fixed by #42632
Closed

Add Threshold Lines in Charts #5037

stormpython opened this issue Sep 25, 2015 · 22 comments · Fixed by #42632
Labels
Feature:ElasticCharts Issues related to the elastic-charts library Feature:Vislib Vislib chart implementation Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@stormpython
Copy link
Contributor

Create an option to add a line to charts that represents some threshold. This would be a line that has a constant value. For example, add a straight line to a bar chart, which would represent a low threshold.

@tbragin
Copy link
Contributor

tbragin commented Sep 25, 2015

It seems that scripted fields offer a pretty good alternative here:
screen shot 2015-09-25 at 11 51 13 am
screen shot 2015-09-25 at 11 27 08 am

@stormpython
Copy link
Contributor Author

@tbragin true, so closing this issue.

@spalger
Copy link
Contributor

spalger commented Sep 29, 2015

I think that a scripted field is a fine workaround but I disagree that it replaces the need for horizontal marker type (ala #1983) functionality.

@bcwilsondotcom
Copy link

I agree. Scripted fields doesn't offer the sort of functionality that #1983 seeks.

@AlexClineBB
Copy link

The scripted field may work for line visualizations, but it isn't compatible with an area visualization using sub-aggregations. The ability to add a threshold is still needed in this case.

@tbragin
Copy link
Contributor

tbragin commented Mar 17, 2016

@AlexClineBB fair enough, let's reopen this :)

@tbragin tbragin reopened this Mar 17, 2016
@ponythan
Copy link

ponythan commented Apr 5, 2016

+1, scripted fields works for the most (thanks for the tip) but a threadshold value would be awesome :)

@ngwmm
Copy link

ngwmm commented Jun 28, 2016

+1
Please...

@tbragin
Copy link
Contributor

tbragin commented Sep 22, 2016

via @neigor from #5012

Often it is useful to be able to add some benchmark lines to the graph (line chart) to provide context to the user. E.g. we are using Kibana to visualize monitoring data and would love to be able to visualize alert thresholds. For example plot CPU utilization based on ES data and add 2 static line - one for warning threshold (e.g. at 75%) and one for error threshold (e.g. 90%).
This helps to quickly see we are trending towards limit and also to visually see when we went above the limit and for how long.

Actually, scripted fields are not solving this fully. Problem is that they are global and for every threshold line new scripted field is needed (if constant value is different). In our case we have thousands of visualizations and adding hundreds of constant scripted fields is expensive and hard to manage. It will be much easier to manage if this could be defined as visualization property.

@tbragin tbragin added the Feature:Visualizations Generic visualization features (in case no more specific feature label is available) label Nov 1, 2016
@bunjamins
Copy link

I'd also like to comment that the above workaround only works in a line chart if your Y axis aggregation is "average", using a scripted field doesn't insert a straight line on a "count" aggregation.

+1 would like the ability to add horizontal threshold lines. Also would like horizontal shaded areas and vertical lines and shaded areas. (vertical line in a histogram is useful to mark events or interventions such as a code release or system reset, then compare that impact across multiple graphs.

@node
Copy link

node commented Dec 15, 2016

+1
In my case a yellow or/and red water line (just a warning line with a threadhold y axis value) is needed.

@Koriit
Copy link

Koriit commented May 19, 2017

Hey,
Is it going to get implemented? I believe threshold line is pretty common use case.

@daboom
Copy link

daboom commented Jun 15, 2017

+1
Thresholds are needed

@alexfrancoeur
Copy link

This is available today in the new time series visual builder. In 5.5 we introduced a static series options that allows for configurable thresholds (#11496).

@kribor
Copy link

kribor commented Nov 9, 2017

@alexfrancoeur While good for timelion, this feature is still desperately needed for other visualizations. Adding my 2 cents on the workaround - it pollutes the data severely with bunch of nonsense values that should be linked to a specific visualization, not the data. Having multiple thresholds in different graphs over same index is a mess...

@kribor
Copy link

kribor commented Nov 15, 2017

Actually, after taking some time to learn the very differt UI of visual builder it does all of what I imagine using this for with better options than default visualizations so I'm good already

@alexfrancoeur
Copy link

@kribor great to hear! The time series visual builder UI is curated specifically for time series. There are lots of options in this UI, including full support for pipeline aggregations and annotations.

@timroes timroes added the Feature:ElasticCharts Issues related to the elastic-charts library label May 3, 2018
@RealCertimo
Copy link

Is it planned when functionality will be available?

@timroes timroes added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Sep 16, 2018
@ghost
Copy link

ghost commented Oct 15, 2018

I am confused. Was this resolved? I also need to have a threshold line on a vertical bar graph
Does anyone know? My Kibana version is 6.4.2
The Constant value for Average does not exist on the vertical bar graph in 6.4.2. The screenshot from @tbragin is not valid

@d-e-solutions
Copy link

d-e-solutions commented Oct 24, 2018

@jen-huang @alexfrancoeur

Hi,
I will add an example where workaround doesn't work. I have a line chart with split series on Terms of a certain field, and I want to add a constant threshold line. When I add a metric "Average", with a scripted field (the workaround described above), there is not 1 line added, but multiple lines, corresponding to every different value of the field on the Terms split.

Do you have another workaround for my case?

@anlijun
Copy link

anlijun commented Dec 20, 2018

Line chart with split series. Add one scripted fields, will add three lines
image

@viskubrunnur
Copy link

viskubrunnur commented Feb 6, 2019

You can also add an average aggregation on some field you do not use in the visualization and change it's value to a static one with the Json input:
{ "script": { "inline": "doc['winevent.RecordNumber'].value - doc['winevent.RecordNumber'].value + SOMESTATICVALUE", "lang": "painless" } }

@ppisljar ppisljar removed their assignment Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ElasticCharts Issues related to the elastic-charts library Feature:Vislib Vislib chart implementation Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.