Scripted field not showing in line chart of visualize

I am trying to configure scripted filed in kibana (kibana-5.0.0_rc1-1.x86_64)
but the field does not show up in the list of fields for average aggregation
of line chart.

Field shows up in the discover so the setting seems to be ok.

Do I have any other setting that I need to set to use in the visualize ?

This problem was fixed in 5.0 GA version: https://github.com/elastic/kibana/pull/8588

@tbragin

OK . Thanks.