You can use the Spreadsheet Chart API to create charts and modify them in code.
The following table lists the most useful objects, properties and methods of the Spreadsheet Chart API with short descriptions.