"curveValuesTexts"

Maps a text to a certain curve value. Thus, instead the actual value the mapped text is shown in the trend legend and in the window of the ruler value, if the curve takes this value.

Synopsis

setValue(string shape, "curveValuesTexts", string curve, mapping valuesToText);

getValue(string shape, "curveValuesTexts", string curve, mapping valuesToText);

shape.curveValuesTexts(string curve, mapping valuesToText);

Parameters

Parameter Description
shape Name of the object
curve Name of curve
valuesToText Mapping of a value to a text

Description

Maps a text to a certain curve value. Thus, instead the actual value the mapped text is shown in the trend legend and in the window of the ruler value, if the curve takes this value.

The mapped value must be an integer, e.g. int, bool (1,0), float (here only round values are allowed, e.g. 1.0, 5.0, etc.).

This attribute is supported in the value-over-time trend only.

If a differential ruler is used, the defined texts are not displayed, as a difference between two texts is not supported. When the given curve has also a y-scale, this displays the original values of the DPEs and not the defined texts.

If the curve takes a value, which has not a mapped to a text, the original value of the DPE is shown in the legend and in the window of the ruler value.

Example

Defines the texts for the data point elements ExampleDP_Trend1 (float; curve "a") und ExampleDP_AlertHdl1 (bool; curve "b").

main()
{
  mapping m;
  mapping m2;
  m[1]="TRIPPED";
  m[2]="STOPPED";
  m[3]="RUNNING"; 
  m[10]="RUNNING1"; 
  m[11]="RUNNING2"; 
  TREND1.curveValuesTexts("a", m);
  m2[1]="ON";
  m2[0]="OFF";
  TREND1.curveValuesTexts("b", m2);
}

If the data point element ExampleDP_Trend1 has a value of 3.0, the text "RUNNING" is displayed in the trend.

If the data point element ExampleDP_AlertHdl1 has a value of 0, the text "OFF" is displayed in the trend.

Abbildung 1. Trend Ruler Values panel>

Assignment

Trend