Custom chart in ERPNext

How add custom charts to dashboard view of a doctype?