[BugFix] Legend terms value should follow the chart precision

I know this is still Kibana3 and pull requests are no more accepted
but this is a quite annoying bug and it is very simple to fix: the
legend term values with a ridiculous number of decimal digits
instead of truncating according to the panel precision decimals.

If anyone is still using Kibana3, they can benefit from this useful
fix.

The panel precision is an extra JSON Integer element in the panel
definition that specifies how many decimal places need to be retained.