Issues with Dashboard PointValue Colors
-
I have a lot of data points that come via PersistentTCP Sync to our enterprise install where the dashboards are hosted.
I want all of the dashboards to have a black background.
The ones that are giving me issues have templates with Text Render Properties.
At first, all of the text was originally in black and when I added these points to the dashboard, I chose a text color of white.
This worked well. What was originally a black color, was not transformed into white.
I went back to edit these templates and the Text Render Properties to give some different colors to the text to differentiate between normal and alarm statuses.
This is where the issue comes in.
Previous text where color was transformed into white is now black and of course will not be visible. The other text render properties are all good.
Ideally I'd like to keep the black text render because otherwise it will not be visible on the UI.
Is there a way to transform only black to white in the elements?
What are my options?
-
@mihairosu I'd need to see your markup, and likely the styling you have applied
If you can see what it is using the developer's console and add the CSS styling you require, we can probably override whatever is causing the issue for you
Fox
-
@MattFox
I just used the built- in GUI tools.Sorry this isn't formatted well. It's what the GUI editor spits out.
The other thing that confuses me, is why some of the items are not getting the right formatting, even though they share the same exact template.
See "Water Flow Sw", "Drain Blocking Sw" items.
I'll try re-creating the items in the GUI.
P.S. I am not allowed to attach files :
-
@mihairosu You can try copy the Markup content here
-
-
I think part of my issue is that the dashboard elements formatting are fighting with what is provided by the point value(s), so I may have to stick with one or the other to do the formatting.
However, I cannot see an easy way to format the element text, depending on its value using the dashboard designer, so if I want that I may have to stick with the point render method.
Any recommendations?
-
Here is an example of formatting the text based on the point value:
<ma-point-value enable-popup="left" point="p" style=" font-size: 19px; " ng-style="{'color': p.value >= 60 ? '#00ff00' : p.value >= 35 ? 'yellow' : 'red' }"></ma-point-value>
-
@mihairosu
Another update.I re-checked the templates for the Text Render Properties, and some didn't save properly for some reason, once I fixed them, the colors appeared correct on all of the elements.
-
Thanks for the example. For now I'd prefer to stick to GUI as much as possible and therefore to the text render properties, but where it's absolutely required and there's no other way, I'll switch over to editing the HTML.
-
@mihairosu
So it looks like you cannot override the text renderer color on the point-value component I have tried a few times and cannot get it right. Here is a workaround you can do without editing HTMLThe <ma-get-point-value> brings in a point by XID and assigns it to a local scope variable:
P is nowusable on other elements
So I add a text box and in the text content I interpolate the rendered value with double curly brackets and set a color:
-
That's pretty nice, I was actually wondering if it was possible to do something like that. I have some ideas on using a point value to do things to other elements, which would add a lot of value to the dashboards.
Thank you!