fixing tooltip positioning for graphs