Generate chart from custom fields

Hello,

Is it possible to create a chart from a new dynamic field? (new variable).
You can only use fields from the database.

So, I want to generate a graph of age groups from date of birth, how do I do this?

Thanks