move min/max score computation out of drawAssociation
turn drawAssociation into a local function
remove unused variable
pass min/max scores to legend instead of computing them there