Tuning Fano resonances of graphene-based gratings