You'll have to delve into template node to create that functionality
Look at this post from @hotNipi https://discourse.nodered.org/t/how-to-create-charts-similar-to-powerbi-using-node-red/75883/5?u=gerrybartley
It might point you in the right direction,. Otherwise post your question as a new topic so others can assist