helper function for bubble chart