Search code examples
c#reactjsrecharts

React Recharts: is it possible to display a chart in an email?


We are using React Recharts to build charts in an application. We also have a requirement to render a chart in an email. We are using a C# microservice running in Kubernetes to send emails. Is it possible to render a chart in C# and put it in an email?


Solution

  • Displaying a chart generated with React Recharts directly in an email poses some challenges due to the limitations of most email clients, which do not support JavaScript code.

    React and Recharts rely on JavaScript to create dynamic, interactive charts, and this functionality is not supported by many email clients.

    Tools like node-html-to-image or html2canvas can help capture your chart component as an image.