Issues with Dashboard PointValue Colors
-
@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!