How to install Plotly Locally to run without internet?

I want to apply an offline solution but I can't open the plotly locally.

I have already downloaded plotly.js and am using python to serve the file to my ip address. But when I put the address in the nodered template nothing happens. I tested it with the cdn link and with the nuc connected to the internet and it worked perfectly.

actually im usings charts but they got a lot of crash because of volume of data

Can someone help me?

Make sure the plotly.js library is in a directory accessible to Node-RED. Use the HTTP-request node to retrieve the Plotly graph from a local Python server. In the template node, use the Plotly.newPlot method to create the Plotly graph, passing in the data and layout as arguments. The data and layout can be retrieved from the msg object received from the HTTP-request node.
Template node code will be something like

<div id="plot"></div>
var data = {{{payload}}};
var layout = {title: 'Line Chart'};
Plotly.newPlot('plot', data, layout);

{{{payload}}} is the data received from the HTTP-request node, which is passed into the data variable, and layout sets the title of the chart. The Plotly graph is created in the div with id="plot" .

By the way, why don't you try the UiBuilder node for the custom dashboard?
I faced the same problem a few years back in one of the industrial IIoT projects while using Node-RED Dashboard.

1 Like

This Worked for me:

Plotly Locally run

uibuilder has a library manager that lets you install plotly and it will then run offline if you want.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.