Fixed setting values for legend data to avoid NPE
Fixed LegendView constructor