implemented the dynamic chart!!!!!