Hello. Check out this example on how to create a dynamic chart with data from a table/database collection.
Good luck!