Why do you want to export a plotly.js graph to a Canvas? The plotly.js graph is displayed as an image in a WebViewer or a browser. The grapht contains no data that can be exported or displayed simultaneously with generation of the graph data to Canvas coordinates. You want to plot data in real time. Why not plot directly to the Canvas coordinates?
Tim's comments are very appropriate If you can use plotly.js to real time graph, you should do it in the WebViewer. Is that possible? What have you tried?
Here are some examples of using native Blocks to plot directly to the Canvas:
Using a Canvas and Sprites
Using Buttons
Using javascript
Monitor this thread. Someone might know something we are not aware of to use plotly.js in conjunction with the Canvas.
You might also consider using the ChartMaker extension. The Chart extension no longer works with App Inventor on some versions of Android ChartMaker works on my 7.0 and 8.1 but does not work on my 4.2.2 Tablet.
Regards,
Steve