add legends to the charts