Add chart functionality