How to set text to change colour on IF ELSE results in a Thingsboard widget with javascript?How to change an element's class with JavaScript?How to set a JavaScript breakpoint from code in Chrome?How do I get the value of text input field using JavaScript?Changing text colour or background depending on value of input fieldJQuery changing colour of text within columnsChange text colour if number positive in javascriptsending MySQL data from the pastChanging font color for some of the values enclosed in a <td> tagJavascript: Changing the colour of dynamic api data?javascript pause function execution until event is triggered

The selling of the sheep

Which version of the Squat Nimbleness feat is correct?

What does the copyright in a dissertation protect exactly?

Two denim hijabs

Endgame puzzle: How to avoid stalemate and win?

Guess the number game (Python)

Why can't argument be forwarded inside lambda without mutable?

Gerrymandering Puzzle - Rig the Election

Strange behavior editing photos in photoshop and back in lightroom

Convert Numbers To Emoji Math

Is it normal for gliders not to have attitude indicators?

What would happen if I combined this polymer and this metal (assuming I can)

How did the Apollo guidance computer handle parity bit errors?

What does のそ mean on this picture?

What is more safe for browsing the web: PC or smartphone?

What does the coin flipping before dying mean?

Copper as an adjective to refer to something made of copper

What happens if I accidentally leave an app running and click "Install Now" in Software Updater?

Class Not Passing SObject By Reference

Can an earth elemental drag a tiny creature underground with Earth Glide?

Was there a dinosaur-counter in the original Jurassic Park movie?

Can anyone identify this unknown 1988 PC card from The Palantir Corporation?

Is there precedent or are there procedures for a US president refusing to concede to an electoral defeat?

How did the Force make Luke hard to hit in the Battle of Yavin?



How to set text to change colour on IF ELSE results in a Thingsboard widget with javascript?


How to change an element's class with JavaScript?How to set a JavaScript breakpoint from code in Chrome?How do I get the value of text input field using JavaScript?Changing text colour or background depending on value of input fieldJQuery changing colour of text within columnsChange text colour if number positive in javascriptsending MySQL data from the pastChanging font color for some of the values enclosed in a <td> tagJavascript: Changing the colour of dynamic api data?javascript pause function execution until event is triggered






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








4















I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.



I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.




Sensor A Status






The following is my current code in the 'Advanced Data Key Tab - Use cell content function':



var nodeStatus = entity['sensor.a'];

if (nodeStatus == '0')

return "OK";
else
return "ALARM";



I want to change the Returned String colour to the following:



OK = Green font



ALARM = Red font



How do I do this?






UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.



Data key configuration






This is now making the entire column change to Red:



Sensor A Status






I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:



enter image description here



UPDATE:



I have removed the nodeStatus function from the "Cell Content Function" as per below comments:



enter image description here



After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).



enter image description here










share|improve this question
























  • Any news on this one? Please add the console output of this cell style function: console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];

    – lupz
    Apr 2 at 8:26











  • I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.

    – DenMurphy
    Apr 4 at 5:01












  • I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.

    – lupz
    Apr 5 at 11:35


















4















I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.



I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.




Sensor A Status






The following is my current code in the 'Advanced Data Key Tab - Use cell content function':



var nodeStatus = entity['sensor.a'];

if (nodeStatus == '0')

return "OK";
else
return "ALARM";



I want to change the Returned String colour to the following:



OK = Green font



ALARM = Red font



How do I do this?






UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.



Data key configuration






This is now making the entire column change to Red:



Sensor A Status






I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:



enter image description here



UPDATE:



I have removed the nodeStatus function from the "Cell Content Function" as per below comments:



enter image description here



After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).



enter image description here










share|improve this question
























  • Any news on this one? Please add the console output of this cell style function: console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];

    – lupz
    Apr 2 at 8:26











  • I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.

    – DenMurphy
    Apr 4 at 5:01












  • I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.

    – lupz
    Apr 5 at 11:35














4












4








4


1






I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.



I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.




Sensor A Status






The following is my current code in the 'Advanced Data Key Tab - Use cell content function':



var nodeStatus = entity['sensor.a'];

if (nodeStatus == '0')

return "OK";
else
return "ALARM";



I want to change the Returned String colour to the following:



OK = Green font



ALARM = Red font



How do I do this?






UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.



Data key configuration






This is now making the entire column change to Red:



Sensor A Status






I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:



enter image description here



UPDATE:



I have removed the nodeStatus function from the "Cell Content Function" as per below comments:



enter image description here



After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).



enter image description here










share|improve this question
















I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.



I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.




Sensor A Status






The following is my current code in the 'Advanced Data Key Tab - Use cell content function':



var nodeStatus = entity['sensor.a'];

if (nodeStatus == '0')

return "OK";
else
return "ALARM";



I want to change the Returned String colour to the following:



OK = Green font



ALARM = Red font



How do I do this?






UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.



Data key configuration






This is now making the entire column change to Red:



Sensor A Status






I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:



enter image description here



UPDATE:



I have removed the nodeStatus function from the "Cell Content Function" as per below comments:



enter image description here



After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).



enter image description here







javascript thingsboard






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 7:52









lupz

1,77011834




1,77011834










asked Mar 23 at 4:26









DenMurphyDenMurphy

235




235












  • Any news on this one? Please add the console output of this cell style function: console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];

    – lupz
    Apr 2 at 8:26











  • I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.

    – DenMurphy
    Apr 4 at 5:01












  • I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.

    – lupz
    Apr 5 at 11:35


















  • Any news on this one? Please add the console output of this cell style function: console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];

    – lupz
    Apr 2 at 8:26











  • I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.

    – DenMurphy
    Apr 4 at 5:01












  • I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.

    – lupz
    Apr 5 at 11:35

















Any news on this one? Please add the console output of this cell style function: console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];

– lupz
Apr 2 at 8:26





Any news on this one? Please add the console output of this cell style function: console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];

– lupz
Apr 2 at 8:26













I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.

– DenMurphy
Apr 4 at 5:01






I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.

– DenMurphy
Apr 4 at 5:01














I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.

– lupz
Apr 5 at 11:35






I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.

– lupz
Apr 5 at 11:35













1 Answer
1






active

oldest

votes


















0














There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:



/* Assuming value is your nodeStatus */

if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;






share|improve this answer























  • Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.

    – DenMurphy
    Mar 26 at 7:01











  • It is beacause the value is never === '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?

    – lupz
    Mar 26 at 10:38












  • In your screens I saw that it already is sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.

    – lupz
    Mar 26 at 12:20











  • I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.

    – DenMurphy
    Mar 27 at 5:46












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310608%2fhow-to-set-text-to-change-colour-on-if-else-results-in-a-thingsboard-widget-with%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:



/* Assuming value is your nodeStatus */

if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;






share|improve this answer























  • Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.

    – DenMurphy
    Mar 26 at 7:01











  • It is beacause the value is never === '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?

    – lupz
    Mar 26 at 10:38












  • In your screens I saw that it already is sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.

    – lupz
    Mar 26 at 12:20











  • I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.

    – DenMurphy
    Mar 27 at 5:46
















0














There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:



/* Assuming value is your nodeStatus */

if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;






share|improve this answer























  • Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.

    – DenMurphy
    Mar 26 at 7:01











  • It is beacause the value is never === '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?

    – lupz
    Mar 26 at 10:38












  • In your screens I saw that it already is sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.

    – lupz
    Mar 26 at 12:20











  • I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.

    – DenMurphy
    Mar 27 at 5:46














0












0








0







There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:



/* Assuming value is your nodeStatus */

if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;






share|improve this answer













There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:



/* Assuming value is your nodeStatus */

if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 25 at 12:39









lupzlupz

1,77011834




1,77011834












  • Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.

    – DenMurphy
    Mar 26 at 7:01











  • It is beacause the value is never === '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?

    – lupz
    Mar 26 at 10:38












  • In your screens I saw that it already is sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.

    – lupz
    Mar 26 at 12:20











  • I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.

    – DenMurphy
    Mar 27 at 5:46


















  • Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.

    – DenMurphy
    Mar 26 at 7:01











  • It is beacause the value is never === '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?

    – lupz
    Mar 26 at 10:38












  • In your screens I saw that it already is sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.

    – lupz
    Mar 26 at 12:20











  • I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.

    – DenMurphy
    Mar 27 at 5:46

















Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.

– DenMurphy
Mar 26 at 7:01





Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.

– DenMurphy
Mar 26 at 7:01













It is beacause the value is never === '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?

– lupz
Mar 26 at 10:38






It is beacause the value is never === '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?

– lupz
Mar 26 at 10:38














In your screens I saw that it already is sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.

– lupz
Mar 26 at 12:20





In your screens I saw that it already is sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.

– lupz
Mar 26 at 12:20













I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.

– DenMurphy
Mar 27 at 5:46






I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.

– DenMurphy
Mar 27 at 5:46




















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310608%2fhow-to-set-text-to-change-colour-on-if-else-results-in-a-thingsboard-widget-with%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해