Promotic

Preconfiguration "Data in linear chart and in histogram"

Panel displaying data in linear graph and in histogram.

This preconfiguration can be activated when creating a new object (e.g. by "New object ..." in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: "/ Panels (PmaPanel) / Trends and graphs".
This preconfiguration can be created in the object: PmaFolder, PmaRoot, PmaPanel or PmaWorkspace.
The preconfiguration is created including the panel (object of the PmaPanel type) is functional also as Web panel. In order to make the preconfiguration functional also on the Web, it is necessary to enable the object of the PmaPanel type for the Web (on the "Web server" tab).

The preconfiguration creates panel containing two graphs. One shows data progression (trend) a the second represents frequency of appearance of values in defined value intervals (histogram). Both Pmg objects are created in PmgCanvas. The outer objects render scales and rasters. The inner objects (Dynamic) render the data progression based on values in its variables val1 and values

The button in the panel calls GetData panel method for obtaining requested 1-dimensional data array. (This method uses emulated data for demonstration purposes.) This data array is passed to corresponding graphis into DrawGraph methods for processing and rendering.

The "DrawGraph" method of the Trend graph transforms the data into string, where the individual values are separated by semicolon. The string is then inserted into the val1 variable of the internal Dynamic object. The scale range and appearance are defined by variables minY and maxY and by variables at the beginnong of the script of the "DrawScaleY" method.

The "DrawGraph" method of the Histogram graph processes the date in order to compute the frequency of appearance of values in the range defined in the valuesX variable. The resulting values are separated by semicolon and inserted into the values variable of the internal object Dynamic. The highest number of appearance is rounded and and written into the max variable. This number is then used to adapt the range of the scale. The appearance of the scale is defined by variables at the beginning of the "DrawScale" method script.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma objects tree. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
Default: "Histogram"
Panel titleUser name of the panel that is displayed for example in:
- in the window title bar (if opened outside the workspace)
- in the panel list obtained for example by the FindViewers method

This configurator sets the initial value of the property PmaPanel.Title and PmgRoot.ViewerTitle.
Macro expression can be used for input ($.text ..) (it is evaluated while the window is opening).
After the preconfiguration is created, the "PmaPanel > Panel > Panel title" configurator will be set to this value.
Enable as Web componentSpecifies whether this object has to be registered as a Web server component
After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value.
Linear graph (trend)
ColorColors in the HTML format (Working with colors description)
Range from minimumStart of range
Range to maximumEnd of range
Histogram
Column value rangesValue ranges of graph bars separated by semicolon
ColorColors in the HTML format (Working with colors description)

History:
Pm8.03.16: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.