Maximum of values as data point in Kibana 4

Hi,
I posted this problem on SO some time ago. Now I'm not even sure if it is solvable with Kibana. Here it is:

I have area chart which is representing build time for various jobs
from our Jenkins. There are some jobs that are running in parallel, and
when last of them is completed other build is triggered.

Example:

"JobType1" triggers "JobType2", "JobType3", "JobType4". When last from 2,3,4 will complete, "JobType5" is triggered.

I know how to stack duration data from "JobType1" and "JobType5" and I
would like to put maximum of "JobType2", "JobType3", "JobType4" as
single value between them.

How to do that?

I think the only way to do that is to add a scripted field to your index...

Kibana:Settings:Indices:Scripted Fields

And add something like : max(max(doc['JobType2'].value,doc[JobType3'].value),doc['JobType4'].value)