Add some safety around out of control graphs?

A couple of time now, while trying to generate a new graph, Kibana becomes unresponsive while trying to generate graph. After several minutes, I end up having to just close the browser tab and start a new one.

If in the case of a saved visualization, this results in not being able to even edit the visualization and breaks any dashboards its in.

In all cases when this has happened, it has been due to some rouge bad value in a single field of a single document getting uploaded.

It would be very helpful to have some safety checks for long graph rendering. In a collection of 5500 documents, a given field that normally ranges around values from 0-200, has one one rouge document with a value of -42,000, kills a histogram chart with an interval of 10. Some quick calculation up front should be doable to detect that you are about to generate a graph with 4200 bars/slices/etc. which should be enough to pop a user message warning them and asking if they want to continue loading the visualization.

There's an existing Github ticket for this, I'd encourage you to add your feedback there: https://github.com/elastic/kibana/issues/2908

Done. Thanks!