Dashboard Table - Mixing Data Types

I am trying to create this table on a Node-Red dashboard:

image

I have been through this forum and other online advice and have found only complicated solutions discussing passing arrays to template nodes or ng-repeat (which did not like the strings). I have gotten very close but cannot reproduce the comma separator (due to using using parseFloat to Fixed). See just a couple of the references or examples below.

Is there a straightforward method to mix Strings (the first two columns) and Numbers with different decimal digits in a dynamic table in Node-Red dashboard? I have tried node-red-node-ui-table. Can I use ng-repeat for each row individually and change the format? Can I call each element in my array (msg.payload) individually in the template note code?

It also seems to me that toLocaleString() would solve my issue but I have red a few posts that this does not work with Node-Red. Does anyone know if this has been corrected?

Thanks for any ideas or additional references.

[SOLVED]

I solved it myself by upgrading my Node-Red because earlier versions did not used toLocaleString properly.

Then:

number = number.toLocaleString('en-US', {maximumFractionDigits: 0});

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.