A graph, like all other UI controls, can be created with NewCtrl or DuplicateCtrl functions: the latter to be used when another control already exists that an be used as a source to copy the new control from. in case of a simple graph the command to create it from scratch is:
controlID = NewCtrl (panelHandle, CTRL_GRAPH_LS, "New Graph", top, left);
you will need them to customize the graph according to your need with a set of SetCtrlAttribute and some additional command to customize axes and so on.
To have an example of all this, I suggest you to use the UI to code converter tool: create a UIR file that has only one panel with a graph, interactively customize the graph as you want, save the UIR file and pass it to the tool found in Tools menu: the tool will create .c and .h files with all the instructions needed to create the panel and the graph from scratch.