Retrieves the appropriate Legend configuration based on the given LegendCode.
The corresponding Legend, or null if the code is not recognized.
The LegendCode enum representing the desired legend.