ZoomCharts Documentation

FacetChart.settings.valueAxisDefault

This section is defined by the type LinearChartSettingsValueAxis.

The default settings inherited by all value axis.

Properties

animate: "auto" | "always"
Default value: "auto"
Introduced in version 1.18.0.

Always animate value axis

Valid values:
  • auto - Only when necessary
  • always - Animate also on the first load
axisLine: boolean
Default value: false

Whether to show vertical line along value axis

enabled: boolean
Default value: true

Show/hide value axis.

hgrid: boolean
Default value: null

Whether to show horizontal grid lines. Specifying null means that only the first value axis will show the horizontal lines, all other axis will not.

initialAnimationValue: number
Default value: null
Introduced in version 1.18.0.

This parameter works together with animate when it's set to "always" as here you can define fixed initial value that should be used for animation beginning. If set to 0, then animation would be with "dropping" effect. If set to larger value than your maximum series value, then effect would be "growing". If you want animation value to be calculated automatically depending on your data, keep default value and adjust initialAnimationValueMultiplier.

initialAnimationValueMultiplier: number
Default value: 4.5
Introduced in version 1.18.0.

This parameter works together with animate when it's set to "always". It's used for multiplying maxium series value to get "growing" or "dropping" animation effect. By default (if initial animation is turned on) there would be "growing" effect. You can increase this value if you need "further growing". To make "dropping" effect you should use values less than 1, (for example: 0.45). Also adjust scaleAdjustmentAnimationDelay to make animation longer.

logScale: boolean
Default value: false

Whether to use logarithmic scale.

maxValue: number
Default value: null

Fixed maximum value for value axis. If not set it will be computed automatically from visible data and zeroLine settings.

minValue: number
Default value: null

Fixed minimum value for value axis. If not set it will be computed automatically from visible data and zeroLine settings.

position: "inside" | "outside"
Default value: "outside"

Location of the value axis.

Valid values:
  • inside - on the left side, outside of the chart
  • outside - on the left side, inside of the chart
scaleAdjustmentAnimation: "=" | "<>"
Default value: "="

The animation easing function.

Valid values:
  • = - linear animation
  • <> - quadratic easing
scaleAdjustmentAnimationDelay: number
Default value: 200

Scale adjustment animation duration.

scaleAdjustmentTolerance: number
Default value: 0.3

This tolerance specifies how big that part is as fraction of total chart height. When part of the vertical space is not used chart scale is automatically adjusted.

scaleMinStep: number
Default value: 0

Smallest difference between two labels. For example, use 1 to disallow the labels to go into fractions.

scaleStep: number
Default value: null

Difference between two values on the axis. If not set (default), will be automatically calculated from chart height, min, max value and style.labelSpacing.

side: "right" | "left"
Default value: "left"

Value axis side in chart. Possible values: "left" or "right".

size: number
Default value: null

Fixed width of the value axis. If not set it will be computed automatically from font size.

Style for parts of value axis.

Properties
View section details

Rendering style for the vertical line along value axis.

View section details

Base line settings. It is the horizontal line showing zero value.

View section details

Horizontal grid lines.

labelSpacing: number
Default value: 25

Distance between value axis labels.

View section details

Value axis tick lines style.

Version 1.15.0: moved font, fillColor properties to under textStyle.
View section details

Title text for the value axis.

Version 1.15.0: moved font, fillColor properties to under textStyle.
View section details

Value axis label rendering settings.

View section details

Provides the ability to draw threshold guidelines and fill background areas for certain values. For example, this can be used to highlight an area that exceeds certain limit.

title: string
Default value: null

Title text for the value axis.

valueFormat: string
valueFormatterFunction: (value: number, unitName: string, unitValue: number, name: string) => string
Default value: null
Version 1.15.7: the callback is invoked to get the size of the axis if size is not specified.

Prepare custom format values to display in value axis. If using this, consider also setting the size parameter to accommodate your label size.

Parameters
value: number

numerical value to display

unitName: string

name of multiplier - 'K' for thousands, 'M' for millions

unitValue: number

multiplier value - 1000 for thousands, 1 000 000 for millions

name: string

value string that is displayed by default

Return value
Data type: string

string to display at the value

zeroLine: "visible" | "center" | "floating"
Default value: "visible"

Zero line.

Valid values:
  • visible - adjusts position accordingly to the min/max values
  • center - always centered
  • floating - can be outside the visible chart - shown only range between min-max values.
X