I want to implement the group by functionality in line, horizontal,vertical,scatter chart .

Can any one help me regarding this? How can I achieve this.

Thanks