property Serie.ValueFormat as String
Specifies the expression to customize the values to display on the chart (showValue property includes the exValue)

TypeDescription
String A string expression that specifies the format (including ex-HTML) format to display the value's label. The expression supports the following keywords:
  • value, {number} specifies the serie-item's value
  • name, {string} defines the name of the serie as specified by Name property
  • user, {any} specifies the extra data associated with the serie as specified by UserData property
  • index, {number} indicates the index of the category that contains the current value
  • category, {string} specifies the category the current value is in
  • percent, {number} indicates the percent of the item
  • inner, {number} indicates the inner index of the value within the point data. For example, 0 represents the 'open' or 'from' value, 1 represents the 'high' or 'to' value, 2 represents the 'low' value, and 3 represents the 'close' value. This property is defined only for charts that require multi-dimensional arrays, such as candlestick chart types

Additionally, the expression supports:

  • %V0, %V1, %V2 or %V3, {number} retrieve the designated values by referencing %V0 for the open value (for candlestick charts or "from" in column range charts), %V1 for the high value (for candlestick charts or "to" in column range charts), %V2 for the low value (for candlestick charts), and %V3 for the close value (for candlestick charts, defaulting to "value" if unavailable).

This property/method supports predefined constants and operators/functions as described here

The ValueFormat property defaults to an empty string ("") indicating that the value is returned by default. The ValueFormat property specifies the expression to customize the labels to display on the chart. The ShowValue property shows or hides the serie's value-points, value-lines and values. The ValuePoint property specifies the size, color, frame color and size of the value point, frame color, size and length of the value line, color, frame color, size and pad of the value-point's background, each separated by a comma. You can use the Def(exSerieValueFormat) property to define a default ValueFormat that will be automatically assigned to multiple newly created series.

For instance:

The ValueFormat property allows you to control how serie values are displayed. Specifically, a value-point will not be shown if the result of its expression evaluates to an empty string. 

For instance:

    "index = 0 ? (category + `:` + value) : ``"

displays only the first value-point of the serie, combining its category-name and value with a colon, while hiding all other value-points. This expression demonstrates how to selectively display series values using the ValueFormat property. It works as follows:

To enable this behavior, the exHideIfEmpty flag must be included in the serie's ShowValue property. This flag tells the component to hide any value whose expression results in an empty string, allowing for selective display of series values according to your custom logic.

Currently, the Exontrol's built-in HTML format supports the following HTML tags: