Append selection elements inside chart function
Fully encapsulate circles inside the chart
Create a group with all events
Extract radius calc
Create x scale at once
Add events grouped by kind