Extract Max value of build number from result and use it in filter value

I got max value from this query, but how to use this in visualizations buckets ?

GET logstash-report-2017.10.13/_search
{
"aggs" : {
"max_id" : { "max" : { "field" : "build_number" } }
}
}