"curveLegendFormat", "curveLegendFormatX"

Sets the format of a value (of a curve legend). The attribute "curveLegendFormatX" sets the format of a value for an XY trend curve of the X part.

Synopsis

setValue(string shape, "curveLegendFormat", string curve, string format);

getValue(string shape, "curveLegendFormat", string curve, string format);

shape.curveLegendFormat(string curve, string format);

setValue(string shape, "curveLegendFormatX", string curve, string format);

getValue(string shape, "curveLegendFormatX", string curve, string format);

shape.curveLegendFormatX(string curve, string format);

Parameters

Parameter Description
shape Name of the object
curve Name of curve
format The format string, for example, "%6.2" (value with two decimal places). For more information on the different formats, see chapter sprintf().

Description

Sets the format of a value (of a curve legend).

The value and the date are shown in the legend only when you right-click the legend at run time.

The following additional formats are accepted:

  • any number of digits like 9
  • exponential representation like 9.999e±99 with %e, %E, %.9e or %.9E
  • normal representation like 9.999 with %f, %F, %.9f or %.9F
  • combination of exponential and normal representation, depending on number with %g, %G, %.9g, %.9G

For a detailed description see also the Windows format specifier and the Linux format specifier

Example

main()
{
  string vaForm = "%6.2";
  this.curveLegendFormat("Curve",vaForm);
  DebugN("Format string for the legend value");
}
Figure 1. A Trend and a Curve Legend showing two Decimal Places

Assignment

Trend