... | eval f=foo/bar_count | chart first(f) as average_tran
... | chart first(eval(foo/bar_count)) as average_tran
You need an aggregator with chart (in this case, first()) as it must be told how to resolve the possibility of multiple values.
I do question why you are charting what will come out as a single value here though, but I assume that you're simplifying somewhat and that your real chart command has a split-by field. Otherwise, you can really just skip the chart command entirely.