Add affinities & Add card ID in tooltips & Generate colors for legend