Added ChFun fitting function.
Fitting ChFun.