refactor(AngularChart Model):Add separate method to handle data transformation