runCode()
in JavaScript or run_code()
in Python. The Python code must include Matplotlib charts.
When a chart is detected, E2B sends the data of the chart back to the client. You can access the chart in the execution.results
array where each item is a Result
object with the chart
property.
Try out AI Data Analyst - a Next.js app that uses E2B to create interactive charts.
Supported intertactive charts
The following charts are currently supported:- Line chart
- Bar chart
- Scatter plot
- Pie chart
- Box and whisker plot