Scada-LTS icon indicating copy to clipboard operation
Scada-LTS copied to clipboard

Text Render as default value renderer in Graphical Views 2.0

Open radek2s opened this issue 3 years ago • 0 comments

Expected Behavior Extend render functionality of "Simple Point Component" in new Graphical Views 2.0 to return not only a "RAW" value but value that was rendered based on the "TextRendererProperties". Similar approach was done on new Graphical Views in "PointValueRenderer.vue" it should works in the same way becasue the "VCSimple -> index.js" file receive in onValueUpdate method the raw point value but can receive a rendered one.

Requirements:

  • Render Binary value (state label and text color)
  • Render Multistate value (key/label rendering, and text color)
  • Render Numeric Value (also all possible combinations)
  • Alphanumeric can be redered as raw Value.
  • String Suffixes should be also rendered if there is any defined. ( like: 12.3 [m])
  • The rendered value should look in the same way how it is working in classic UI Graphical Views

Important note!

The base branch should be feature/#1932_graphical_views_2 and this topic should be an extension from this branch. Also the PullRequest should be opened to this one branch.

Actual Behavior image

Now VCSimple component is composed on the "BasePointComponent" that handle the whole DataPoint logic. During mounted hook all data from /point_value/getValue/{XID} endpoint (that returns also a "textRenderer definition property") are interpreted by "getPointValue()" method. As the name is indicating it is processing the RAW point value and emits it to the "child components". Perhaps this is the place that should be changed to not just emit this value but to emit the "renderedValue()" based on the TextRenderer properties?

Specifications Version: 2.8.0 Platform: Linux

radek2s avatar Feb 08 '22 13:02 radek2s