Frontmatter data displayed in a pie chart

I’m looking for a way to visualize categories from my movie database using the pie chart option from the Charts plugin and I want it to based from the frontmatter data. Hopefully there’s a Dataview query that can do that. Thanks!