The legend | D3 Scatter Plot Challenge

Hi everyone,
I have completed the scatter plot challenge. It passes the tests, yet I think might have gotten the legend wrong.
If anyone can take a look and maybe make a suggestion. I would appreciate it.
https://codepen.io/vasylkb/pen/dyGYBMN
Thanks!