why does metallic character of elements vary in a group and a period?

Ziya Memon's image