I've got quite a few charts & bar graphs in my dashboard that populate with live data.
Being a newbie to charts and populating them with live data, no matter at the time interval the data gets pushed to a chart node, how can I ensure the same msg.topics get set to the same color in every chart or bar graph?
I have the following function right before my chart to populate the chart.
let total = msg.payload.total;
let band = msg.payload.band;
if (band == '1.8')
{
band = '160M'
}
if (band == '3.5')
{
band = '80M'
}
if (band == '7')
{
band = '40M'
}
if (band == '14')
{
band = '20M'
}
if (band == '21')
{
band = '15M'
}
if (band == '28')
{
band = '10M'
}
msg.topic = band;
msg.payload = total;
return msg;
Thanks
Kyle