# How to install Plotly Locally to run without internet?

**URL:** https://discourse.nodered.org/t/how-to-install-plotly-locally-to-run-without-internet/74845
**Category:** Dashboard
**Tags:** node-red-dashboard, chart
**Created:** [7 February 2023 14:15 UTC](https://discourse.nodered.org/t/how-to-install-plotly-locally-to-run-without-internet/74845 "2023-02-07T14:15:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sm4l](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sm4l/32/76085_2.png) [@sm4l](https://discourse.nodered.org/u/sm4l)
#### Post date: [7 February 2023 14:15 UTC](https://discourse.nodered.org/t/how-to-install-plotly-locally-to-run-without-internet/74845/1 "2023-02-07T14:15:53Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Squirrelbd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/squirrelbd/32/13451_2.png) [@Squirrelbd](https://discourse.nodered.org/u/Squirrelbd)
#### Post date: [7 February 2023 18:20 UTC](https://discourse.nodered.org/t/how-to-install-plotly-locally-to-run-without-internet/74845/2 "2023-02-07T18:20:56Z")

</div>

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

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

```

`{{{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](https://www.programmingboss.com/2020/09/node-red-dashboard-uibuilder-node-with.html) node for the custom dashboard?  
I faced the same problem a few years back in one of the [industrial IIoT projects](https://www.programmingboss.com/2020/11/industrial-automation-based-on-node-red-and-raspberryPi.html) while using Node-RED Dashboard.

---

<div class="post-metadata">

### Author: ![sm4l](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sm4l/32/76085_2.png) [@sm4l](https://discourse.nodered.org/u/sm4l)
#### Post date: [12 February 2023 15:54 UTC](https://discourse.nodered.org/t/how-to-install-plotly-locally-to-run-without-internet/74845/3 "2023-02-12T15:54:50Z")

</div>

This Worked for me:

[Plotly Locally run](https://discourse.nodered.org/t/how-to-add-use-external-libraries-in-flexdash-plotly-js/73166/)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [12 February 2023 16:21 UTC](https://discourse.nodered.org/t/how-to-install-plotly-locally-to-run-without-internet/74845/4 "2023-02-12T16:21:06Z")

</div>

> [@Squirrelbd](#):
>
> By the way, why don't you try the [UiBuilder](https://www.programmingboss.com/2020/09/node-red-dashboard-uibuilder-node-with.html) node for the custom dashboard?  
> I faced the same problem a few years back in one of the [industrial IIoT projects](https://www.programmingboss.com/2020/11/industrial-automation-based-on-node-red-and-raspberryPi.html) while using Node-RED Dashboard.

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [26 February 2023 16:21 UTC](https://discourse.nodered.org/t/how-to-install-plotly-locally-to-run-without-internet/74845/5 "2023-02-26T16:21:38Z")

</div>

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