You can use chartist-render web component to turn a CSV file into a donut chart. Here’s how:

<chartist-render chart-title="Favorite Donuts" chart-desc="A donut chart of favorite donuts." data-source="https://webcomponents.psu.edu/styleguide/elements/chartist-render/demo/donut.csv" options="{"donut":true}" scale="ct-square" type="pie" style="max-width:300px;">
</chartist-render>

To see how your CSV should be set up, download this example file.

Learn more about how to customize it at https://webcomponents.psu.edu.