Charts can be rendered by populating data from database. Given example shows populating data from database and render the chart. It also includes PHP source code that you can try running locally.
Copy and paste this URL into your WordPress site to embed