Hi Roy,
You can find a an example here . For more chart styles, see here . To obtain the records from the collection use getItems.