Chemical evolution of the intra-cluster medium