There is a great example flow you should import with lots of chart examples:
https://flows.nodered.org/flow/2938d98507c81648a2ab5ac1ba6e7d31
give it a try and take a look at the examples and see if one of them answers your question (or generates more questions )