Hi @abra
If you want to use third party libraries as part of your node-red dashboard then you need to:
- copy those libraries to a directory of your choosing
- set
httpStatic
in your node-red settings file to point at that directory.
The node-red runtime will then serve the files from the directory.
You can then add the appropriate <script>
and <style>
tags to a ui_template node in order to load that content into your dashboard.
For example,
- create a directory called
/home/user/node-red-static/charts/
- copy all of the chart.js content into that directory - lets assume that includes a file called
chart.js
. - set
httpStatic
in your settings file to/home/user/node-red-static
- restart Node-RED
- check you can load
http://localhost:1880/charts/chart.js
in your browser.
In your ui_template you'd need:
<script src="http://localhost:1880/charts/chart.js"></script>
Of course, you'll have to refer to the chart.js documentation to understand exactly what files need including in your html page.