Thank you for the advice, I managed to get it working.
I had to do 3 steps:
- Had to install some dependencies as described on https://www.npmjs.com/package/canvas
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- Next I could install canvas (using the pi user, starting /home/pi folder):
npm install canvas
- After the above 2 steps chart-image has installed from the Palette Manager in Node-Red.
Your example is working now.
Let me ask a related question: if I want to create a small graphics for example show a measurement value, maybe influence the colour based on the value, add trending icon or something similar and send that over telegram as an image. Since I have canvas installed, I could just create a canvas object and save the result to an image similarly like it is done for the canvas image, right?