def get_timeline_data(doctype, name):
 from frappe.desk.form.load import get_communication_data
 data = get_communication_data(doctype, name, fields=u'unix_timestamp(date(creation)), count(name)', after=add_years(None, (-1)).strftime(u'%Y-%m-%d'), limit=366, group_by=u'group by date(creation)', as_dict=False)
 return dict(data)

def get_timeline_data ( doctype , name ) : from frappe . desk . form . load import get_communication_data data = get_communication_data ( doctype , name , fields = u'unix_timestamp(date(creation)), count(name)' , after = add_years ( None , ( - 1 ) ) . strftime ( u'%Y-%m-%d' ) , limit = 366 , group_by = u'group by date(creation)' , as_dict = False ) return dict ( data )
return timeline for attendance .