linking actually working between bar and scatter, fixed bugs that created too many points