Fix Trend widget

when there was only one valid data point avg value was always 1/2 of the
real avg.