ZoomCharts Documentation

FacetChart.settings.valueAxisDefault

This section is defined by the type LinearChartSettingsValueAxis.

The default settings inherited by all value axis.

Properties

alignZero: boolean
Default value: false

Whether to align the zero value with other axes

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.

forceTopAndBottomValues: boolean
Default value: false

Whether to force top and bottom values in the hgrid.

forcedMinMaxInset: number
Default value: 0

Amount to inset the forced min/max values

gridPosition: "above" | "under"
Default value: "above"
Introduced in version 1.18.9.

Placement of grid lines in relation to series data.

Valid values:
  • above - grid lines drawn after series
  • under - grid lines drawn before series
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.

hideInvalidAxis: boolean
Default value: false

Whether to hide the valid axis when it is not valid

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.

onlyPaintMinMax: boolean
Default value: false

Only draw the top and bottom labels

onlyPaintUniqueLabels: boolean
Default value: true

Only draw non-redundant labels

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
autoScaleLabelSpacing: boolean
Default value: true

Whether label spacing should automatically scale with font size

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.

labelSpacingMode: "fixed" | "auto"
Default value: "fixed"

How label spacing is used

Valid values:
  • fixed - Use labelSpacing value directly
  • auto - Automatically calculate spacing; use labelSpacing as an additional scale/offset value
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

Following formats are supported:

^0([.,]0+)?( ?%) - percentage ^([^0-9]+)?0?([.,]0+)?([^0-9]+)? - currency

valueFormatterFunction: (value: number, unitName: string, unitValue: number, name: string, extra?: any) => 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

extra: any

additional metadata for advanced use cases

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