ZoomCharts Documentation
ZoomCharts.Configuration.LinearChartSettingsValueLabels
Methods
Properties
Whether to allow skipping some labels if there isn't enough space to draw any labels at all
Whether to draw overlapping value labels or not
Whether overlapping labels can be drawn in a stack instead if overlap is disallowed
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) + "$"; }
Parameters
The value which has to be formatted.
The horizontal position (timestamp for TimeChart and item index for FacetChart) where the label is located.
Return value
a string to display in value label.
Whether to show series data labels.
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.
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.
- outside - label will be located above (outside) data point for positive values and below the data point for negative.
- outsideTop - label will be located above (outside) data point
- outsideBottom - label will be located below (outside) data point
- 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 andoutside
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.
Whether to skip drawing labels for null values
Whether to skip drawing labels for zero values
Data label text style.
Advanced: Skip the contents function when calculating font width reduction. Less accurate, but can improve performance is using an expensive contentsFunction.
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
.
insideTopAuto
and all inside
options now automatically reduce the font size.Value label horizontal position in perspective to the series data point.
Valid values:- center - label will be located on the center of the series area.
- insideRight - label will be located inside the series area, aligned to the right.
- right - label will be located on the border of the series area, aligned to the right.
- centerRight - label will be located to the right of the midpoint.
- outsideRight - label will be placed outside the series area, aligned to the right.
- insideLeft - label will be located inside the series area, aligned to the left.
- left - label will be located on the border of the series area, aligned to the left.
- centerLeft - label will be located to the left of the midpoint.
- outsideLeft - label will be placed outside the series area, aligned to the left.