ZoomCharts Documentation


Introduced in version 1.11.0.


This type does not define any methods.


contentsFunction: (value: number, position: number) => string
Introduced in version 1.11.0.
Version 1.16.0: added the position parameter.

Prepare custom content to display in value label along with numeric value. If this callback is not defined, then floating value is formatted with two digits after the decimal point and integer values are formatted without decimal digits. If this callback returns null or undefined for the given value, it won't be created. Note that null values are never passed to the callback. Usage example:

contentsFunction: function(value) { return value.toFixed(2) + "$"; }
value: number

The value which has to be formatted.

position: number

The horizontal position (timestamp for TimeChart and item index for FacetChart) where the label is located.

Return value
Data type: string

a string to display in value label.

enabled: boolean
Introduced in version 1.11.0.

Whether to show series data labels.

minFontSize: number
Introduced in version 1.11.0.
Version 1.15.6: improved handling for font size units other than px.

The font size will be used as defined in series.valueLabel.style. However, if the available space is too narrow, font size will be gradually reduced to the minimum font size. If the minimum font size still does not fit, the values won't be displayed.

Note that this value must match the units that is being used in the style.textStyle.font setting. For example, if the font is specified as 2em Arial then this should be adjusted to, for example, 0.5, since the default value is tailored for font sizes in pixels.

position: "outside" | "aboveValue" | "value" | "belowValue" | "insideTopAuto" | "insideTop" | "insideCenter" | "insideBase"
Introduced in version 1.11.0.
Version 1.12.0: added support for insideTopAuto and all inside options now automatically reduce the font size.

Value label position in perspective to the series data point. Note that in all of the inside options automatically reduce the font size (based on minFontSize setting) in situations when the height of the column or line area does not provide enough room for full-size labels.

Value label possible positions

Valid values:
  • outside - label will be located above (outside) data point for positive values and below the data point for negative.
  • aboveValue - label will be located above the data point (outside for positive values and inside for negative).
  • value - label will be placed over the center of the data point.
  • belowValue - label will be located below data point.
  • insideTopAuto - acts as insideTop if there is enough space in the series area and outside if there is not.
  • insideTop - label will be located inside the series area at the upper edge for positive and bottom edge for negative values.
  • insideCenter - label will be located on the center of the series area.
  • insideBase - label will be located inside the series area at the bottom edge for positive and upper edge for negative values.
Introduced in version 1.11.0.

Data label text style.

useStackedValue: boolean
Introduced in version 1.13.0.
Version 1.15.6: added support for and default changed to null.

Specifies if the value label render the stacked value (the sum of all values below it) or just the individual value of the particular series.

Default value null means that the stacked value is used unless the stack type is set to based.