How to change label background color in perspective label

Hi,
I want to change my label background color in ignition perspective, if tag value varies from 0-70 i want to change background color as red if tag value is > 71 i want change as green color how to do this?

Please anyone reply my question

1 Like

Simply add backgroundColor to your style props and then use an expression binding to manupulate the color using your tag value.

can u explain briefly

can you show in the screenshot sample

Hi,

see screenshot down below.
You can also run a script on that "backgroundColor"-property binding, which gives you more options. But for what you described the screenshot should help

image

image

image

image

If you want to actually get help here you'll need to do a few things:

  1. read the doc and do some research:
    This is a BASIC feature. It is well documented, and there's even a BUILT-IN STYLE MANAGER. All you have to do is to click on the button that's next to the styles property of the label. I mean... We can't click buttons for you.
  2. be patient. Don't ask for an answer 10 minutes after asking the question.

We're not support and we don't gain anything from answering questions, except for a few laughs once in a while, but mostly we get frustrated because people seem to believe we owe them solutions to their problems.

3 Likes

Hey Sorry, but i got solution for above i asked u question, thank you for solving my problem

I'd argue that the real problem hasn't been solved, but hey, I'm neither your employer nor your dad, so what do I care ?

3 Likes

Sorry for a pretty useless bump of a month old post, got sucked down the rabbit hole of this man's threads in the last 15 minutes or so. Regardless, Pascal, this reply sent me to tears and my day's been made :rofl:

2 Likes

If you havent read his topic activity (maybe this is what you were referring to), it's worth a read. It's a collection of, what I'm convinced for his sake, a whole series of relentless practical jokes... Question after question of the same super basic questions easily answered by a Google search, or questions that are so broad and contextless, and when prompted for more information he replies with just the same question regurgitated, that you can't possibly answer them in any meaningful way. Despite being met, at least initially, with enthusiastic and helpful replies with links to the user manual and the IU which he's presumably ignored, his topics remain the same format...

6 Likes

Yeah I was diving through his topic history in increasing horror, and could only come to the same conclusion haha. Better to convince myself this is poor satire and save my optimism from crumbling than accept that he’s serious and unaware of the problems :rofl:

That's the biggest thing; he just keeps on peddling the same topics out, seemingly oblivious of any of these comments. It's bizarre

1 Like