fix(components.legend) Fixes the legend bug with same colored components

Bug: Components with same color was missing a key in the legend.