Fix for trend lines on categorized data

Fixes  #150
Refactor to simplify trend line
Release 0.9.89