Add legend to charts and adjust them in the HTML

Change-Id: I5f2d49a18b82f6f590a70a8da87741d5fe8e8cb4