Hi, I used a lot this chart-image node but now it is outdated , difficult/impossible to install.
Does anybody know any similar solution ?
It is a node to render a chart image so you can use it to send to an email, telegram, ....
Thanks.
Hi, I used a lot this chart-image node but now it is outdated , difficult/impossible to install.
Does anybody know any similar solution ?
It is a node to render a chart image so you can use it to send to an email, telegram, ....
Thanks.
I don’t use a node to do this. I use a function node to create a url containing all my data points, and that is then sent via a http request node to the web page quickchart.io. That page request returns an image of the chart. I save it to a file, and then attach it to the email or telegram message.
@M-a-r-t-i-n Thanks a lot, it is a possibility, but it is a pitty not to have a node for that so we don't depend on an external service.
What are you using to render the chart? Some chart libraries probably have API's to render to an image?
I agree.. I would have preferred to have a node doing it, but that was the best I could come up with when I needed a quick solution. Best of luck with your search.
I think that the node I was using did with canvas and charjs, not external api. It is ony to be able to render the image by my own resources, without any external service that some day could close, not be online, or whatever.
A quick search suggests some possibilities:
Thanks a lot @TotallyInformation
It is not a node, but seems to be easy to implement.
But again, it depends on an external web service: " The renderer is based on QuickChart, a free and open-source web service for generating static charts. View the main QuickChart repository here", isnt it?
Search results & the ai answers will vary from person to person.
One of the suggestions was to use chartjs-node-canvas - npm Which does not use heavy computational Dom but instead the canvas library.
To use that node, you would need to import it in the setup tab of a function node. You will probably need to add a particular version of canvas also since it is a peer dependency (it's mentioned in the readme).
This article will help with importing regular npm packages: Use any npm module in Node-RED • FlowFuse
For anyone wondering why this is so tricky: nodejs does not have DOM (ie nodejs is not a browser) so it's not a simple case of rendering a chart in a full browser environment.