The tool you use initially determines the type of graph Illustrator generates; however, you can easily change the type of graph later on.
Drag diagonally from the corner where you want the graph to begin to the opposite corner. Alt‑drag (Windows) or Option‑drag (Mac OS) to draw the graph from its center. Hold down Shift to constrain the graph to a square.
Click where you want to create the graph. Enter a width and height for the graph, and click OK.
The Graph Data window stays open until you close it. This allows you to easily switch between editing graph data and working on the artboard.