Diagram generation

please how to generate diagrams from the records of a doctype?