generate charts in the template