Graph widget: fix off-by-one error in drawing code, inconsistency in smo...

...othing algorithm