Skip to content

ICategoryDateAxisSettings

Type interface

Sources

ICategoryDateAxisSettings is an interface: it describes a shape of data and is not imported on its own.

Inheritance

ICategoryDateAxisSettings extends ICategoryAxisSettings.

ICategoryDateAxisSettings is not extended by any other symbol.

Properties

baseInterval

Type ITimeInterval

The time interval of the data, such as { timeUnit: "day", count: 1 } for daily data.

More info: Date axis: data granularity

dateFormats

Type undefined | object

Date formats for labels, by the time unit of the grid, such as "day".

More info: Date axis: date formats

gridIntervals

Type Array

Intervals the grid and labels can be placed at, from shortest to longest. The axis uses the shortest that keeps grid lines at least minGridDistance apart.

More info: Date axis: grid granularity

markUnitChange

Type undefined | false | trueDefault true

Formats labels where a new period begins, such as the first day of a month, with periodChangeDateFormats instead of dateFormats.

periodChangeDateFormats

Type undefined | object

Date formats, by time unit, for labels where a new period begins (see markUnitChange).

More info: Date axis: date formats

tooltipDateFormat

Type undefined | string

Date format for the axis tooltip. If not set, the one in dateFormats for the time unit of baseInterval is used.

More info: Formatting dates

124 inherited items
active

Type undefined | false | trueInherited from ISpriteSettings

Applies the element's "active" state while true.

animations

Type ArrayInherited from IEntitySettingsSince 5.20.8

Animations the element plays on its own, described as data - so they can be set from a JSON config and saved with it.

Each one animates a setting of the element (or, with target: "dataItem", a value of its data item - a map point's positionOnLine, say). They start when the setting is applied, restart when it changes, and stop when the element is disposed. A saved config keeps what was configured, never a value caught half way through an animation.

sprite.set("animations", [
  { key: "rotation", to: 360, duration: 4000, loops: 0 },
  { key: "scale", from: 1, to: 1.3, duration: 800, loops: 0, yoyo: true, easing: "sine" }
]);
appearDelay

Type undefined | numberDefault 0Inherited from ISpriteSettingsSince 5.21.0

Milliseconds to wait before the autoAppear animation starts. The element stays hidden until then.

appearDuration

Type undefined | numberInherited from ISpriteSettingsSince 5.21.0

Duration of the autoAppear animation, in milliseconds. Without it, the element's stateAnimationDuration is used.

ariaChecked

Type undefined | false | trueInherited from ISpriteSettings

aria-checked setting.

This setting is ignored unless role is one of the following:

  • "checkbox"

  • "option"

  • "radio"

  • "menuitemcheckbox"

  • "menuitemradio"

  • "treeitem" On a toggle "button" (one with toggleKey) it is exposed as aria-pressed.

ariaControls

Type undefined | stringInherited from ISpriteSettings

aria-controls setting.

ariaCurrent

Type undefined | stringInherited from ISpriteSettingsSince 5.9.8

aria-current setting.

More info: https://w3c.github.io/aria/#aria-current

ariaExpanded

Type undefined | false | trueInherited from ISpriteSettingsSince 5.21.0

aria-expanded setting: whether the content the element shows or hides (e.g. a task's subtasks, a node's children) is shown.

More info: https://w3c.github.io/aria/#aria-expanded

ariaHidden

Type undefined | false | trueInherited from ISpriteSettings

aria-hidden setting.

ariaLabel

Type undefined | stringInherited from ISpriteSettings

Label for the element to use for screen readers.

More info: Accessibility: screen reader

ariaLive

Type AriaLiveInherited from ISpriteSettings

aria-live setting.

ariaOrientation

Type undefined | stringInherited from ISpriteSettings

aria-orientation setting.

ariaSelected

Type undefined | false | trueInherited from ISpriteSettingsSince 5.9.8

aria-selected setting.

More info: https://w3c.github.io/aria/#aria-selected

ariaValueMax

Type undefined | stringInherited from ISpriteSettings

aria-valuemax setting.

ariaValueMin

Type undefined | stringInherited from ISpriteSettings

aria-valuemin setting.

ariaValueNow

Type undefined | stringInherited from ISpriteSettings

aria-valuenow setting.

ariaValueText

Type undefined | stringInherited from ISpriteSettings

aria-valuetext setting.

autoAppear

Type undefined | false | trueDefault falseInherited from ISpriteSettingsSince 5.21.0

Plays the element's reveal animation, as appear() does, when it is first drawn: a chart fades in, a series grows its columns or lines from the base. A series waits for its first data. It plays once: data updates do not replay it, but turning the setting off and on again does.

Elements made from a template play as each one is made.

An element that starts hidden (visible: false, or hidden in code before it is drawn) stays hidden. An animations entry on the same setting, such as a pulsing opacity, keeps playing.

This is how a JSON config gets the opening animation, as a config cannot call appear().

chart.setAll({ autoAppear: true, appearDuration: 1000, appearDelay: 100 });
series.setAll({ autoAppear: true, appearDuration: 1000 });
chart.setAll({ autoAppear: true, appearDuration: 1000, appearDelay: 100 });
series.setAll({ autoAppear: true, appearDuration: 1000 });

More info: Animations

background

Type GraphicsInherited from IContainerSettings

Element drawn behind the container's content, sized to fill the container.

More info: Containers: background

baseValue

Type undefined | numberInherited from IAxisSettings

Base value of the axis.

blur

Type undefined | numberInherited from ISpriteSettingsSince 5.5.0

Blur radius in pixels, from 0 (no blur) up.

IMPORTANT: This setting is not supported in Safari browsers.

More info: Filters

brightness

Type undefined | numberInherited from ISpriteSettingsSince 5.5.0

Brightness.

  • 0 - completely black

  • 1 - no changes (default)

  • >1 - brighter IMPORTANT: This setting is not supported in Safari browsers.

More info: Filters

bullet

Type undefined | (root: Root, axis: Axis, dataItem: DataItem) => AxisBulletInherited from IAxisSettings

Function that creates an AxisBullet for each of the axis's cells, such as each category. Axis ranges get none.

More info: Axes: axis bullets

categoryField

Type stringInherited from ICategoryAxisSettings

Field in the data that holds the category names.

cellSizeField

Type undefined | stringInherited from ICategoryAxisSettings

Field in the data that holds each category's relative size: a category of 2 takes twice the room of one of 1. Categories without it get 1.

centerX

Type number | PercentInherited from ISpriteSettings

The point of the element that is placed at its x position, and that it rotates and scales around: pixels from its left edge, or a percent of its width.

centerY

Type number | PercentInherited from ISpriteSettings

The point of the element that is placed at its y position, and that it rotates and scales around: pixels from its top edge, or a percent of its height.

clickAnnounceText

Type undefined | stringInherited from ISpriteSettingsSince 5.10.8

If set, the text will be read out (announced) by a screen reader when focused element is "clicked" (by pressing ENTER or SPACE).

contrast

Type undefined | numberInherited from ISpriteSettingsSince 5.5.0

Contrast.

  • 0 - completely gray

  • 1 - no changes (default)

  • >1 - more contrast IMPORTANT: This setting is not supported in Safari browsers.

More info: Filters

crisp

Type undefined | false | trueDefault falseInherited from ISpriteSettingsSince 5.3.0

Draws the element sharply, with minimal anti-aliasing: its position is rounded to whole pixels, and strokeWidth is adjusted to the device pixel ratio, so lines may look thinner than expected.

NOTE: it may not work well on several elements that are meant to fit together exactly.

cursorOverStyle

Type undefined | stringInherited from ISpriteSettings

CSS cursor to show while the pointer is over the element, e.g.

"pointer".

More info: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

dateFormatter

Type DateFormatter | undefinedInherited from ISpriteSettings

A DateFormatter to use for this element instead of the root's.

More info: /v5/concepts/using-formatters/

disabled

Type undefined | false | trueInherited from ISpriteSettings

Applies the element's "disabled" state while true. It changes only the look: the element still responds to the pointer.

draggable

Type undefined | false | trueInherited from ISpriteSettings

Lets the user drag the element. Touches that start on it no longer scroll the page.

durationFormatter

Type DurationFormatter | undefinedInherited from ISpriteSettings

A DurationFormatter to use for this element instead of the root's.

More info: /v5/concepts/using-formatters/

dx

Type undefined | numberInherited from ISpriteSettings

Horizontal shift in pixels. Can be negative to shift leftward.

dy

Type undefined | numberInherited from ISpriteSettings

Vertical shift in pixels. Can be negative to shift upward.

end

Type undefined | numberDefault 1Inherited from IAxisSettings

End of the visible (zoomed) part of the axis: 0 is the start of the axis, 1 the end. Set it to pre-zoom: 0.9 hides the last 10%.

More info: Zoom and pan: pre zooming axes

endLocation

Type undefined | numberDefault 1Inherited from ICategoryAxisSettings

Where within the last category the axis ends, from 0 (its start) to 1 (its end): 0.5 cuts off the second half of the last category.

exportable

Type undefined | false | trueInherited from ISpriteSettings

If false, the element is left out of exported images of the chart.

fillRule

Type undefined | (dataItem: DataItem, index: undefined | number) => voidInherited from ICategoryAxisSettings

Function that decides which axis fills show; it is called for each category with its index. The default fills every other category.

More info: Axes: axis fills

fixAxisSize

Type undefined | false | trueDefault trueInherited from IAxisSettings

Keeps the axis from shrinking as zooming changes the visible labels: it keeps room for the widest label shown so far.

focusable

Type undefined | false | trueInherited from ISpriteSettings

Can element be focused, i.e. selected using TAB key.

More info: Accessibility: focusing elements

focusableGroup

Type string | numberInherited from ISpriteSettingsSince 5.0.6

An identifier by which to group common elements into focusable groups.

If set, only the first element in he group will be focusable via TAB key.

When it is selected, the rest of the elements in the same group can be selected using arrow keys.

It allows users to TAB-through chart elements quickly without the need to TAB into each and every element.

It's up to implementer of the charts to provide meaningful ariaLabel to the element, which advertises this capability and provides adequate instructions.

More info: Accessibility: grouping focusable elements

forceHidden

Type undefined | false | trueInherited from ISpriteSettings

Hides the element whatever its visible setting, even when show() is called.

forceInactive

Type undefined | false | trueInherited from ISpriteSettingsSince 5.0.21

Makes the element and its children ignore the pointer, even with interactive: true or event listeners set.

height

Type number | Percent | nullInherited from ISpriteSettings

Height in pixels, or a Percent of the parent's inner height. In a vertical layout, a percent height is a share of the height the other children leave.

hoverOnFocus

Type undefined | false | trueInherited from ISpriteSettings

Simulate hover on an element when it gains focus, including changing hover appearance and displaying a tooltip if applicable.

More info: Accessibility: focusing elements

html

Type undefined | stringInherited from IContainerSettingsSince 5.2.11

HTML content of the container. It can hold data placeholders, such as {category}.

More info: HTML content

hue

Type undefined | numberInherited from ISpriteSettingsSince 5.5.0

Rotates the hue of all colors by this many degrees, from 0 to 360.

IMPORTANT: This setting is not supported in Safari browsers.

More info: Filters

id

Type undefined | stringInherited from IEntitySettings

A unique ID for looking the element up in root.entitiesById. Setting an ID that another element already has throws an error.

idField

Type undefined | stringInherited from ICategoryAxisSettings

Field in the data that holds a unique id for each category.

ignoreThemes

Type undefined | false | trueDefault falseInherited from IEntitySettingsSince 5.15.6

Ignores themes: no theme rule applies to the element, not even one of the default theme.

interactive

Type undefined | false | trueInherited from ISpriteSettings

Makes the element respond to the pointer. Adding a pointer event listener to it turns this on.

interactiveChildren

Type undefined | false | trueDefault trueInherited from IContainerSettings

Makes every descendant, not just direct children, interactive when the container itself is interactive.

interpolationDuration

Type undefined | numberDefault 0Inherited from IComponentSettings

Duration in milliseconds of the animation from old values to new ones, e.g. when data changes.

More info: Animations: animating data values

interpolationEasing

Type $ease.EasingInherited from IComponentSettings

Easing function of the animation from old values to new ones.

More info: Animations: easing functions

invert

Type undefined | numberInherited from ISpriteSettingsSince 5.5.0

Color inversion, from 0 (no changes) to 1 (fully inverted colors).

IMPORTANT: This setting is not supported in Safari browsers.

More info: Filters

isMeasured

Type undefined | false | trueDefault trueInherited from ISpriteSettings

If false, the element's bounds are not measured, so it takes no part in its parent's layout or size.

layer

Type undefined | numberInherited from ISpriteSettings

Layer to draw the element on: elements on higher layers show in front of those on lower ones. If not set, the element is on its parent's layer.

layerMargin

Type IMarginInherited from ISpriteSettingsSince @5.2.39

Margins in pixels that make the element's layer larger than the chart, or, when negative, smaller.

layout

Type Layout | nullInherited from IContainerSettings

How children are arranged, e.g. root.horizontalLayout, root.verticalLayout or root.gridLayout. Without a layout, children are placed by their own x and y.

More info: Containers: layout

marginBottom

Type undefined | numberInherited from ISpriteSettings

Bottom margin in pixels.

marginLeft

Type undefined | numberInherited from ISpriteSettings

Left margin in pixels.

marginRight

Type undefined | numberInherited from ISpriteSettings

Right margin in pixels.

marginTop

Type undefined | numberInherited from ISpriteSettings

Top margin in pixels.

mask

Type Graphics | nullInherited from IContainerSettings

An element whose shape clips the container's children.

More info: Containers: masks

maskContent

Type undefined | false | trueInherited from IContainerSettings

Clips all content that goes outside the container's bounds.

maxDeviation

Type undefined | numberDefault 0.1Inherited from IAxisSettings

How far past its ends the axis can be zoomed or panned, as a share of the visible range: 0.1 is 10%.

More info: Zoom and pan: over zooming

maxHeight

Type number | nullInherited from ISpriteSettings

Maximum allowed height in pixels.

maxWidth

Type number | nullInherited from ISpriteSettings

Maximum allowed width in pixels.

maxZoomCount

Type undefined | numberInherited from IAxisSettings

Most cells to show at a time, such as categories on a CategoryAxis or baseInterval periods on a DateAxis. The axis can't be zoomed out any further.

More info: Zoom and pan: limiting zoom scope

maxZoomFactor

Type number | nullDefault 1000Inherited from IAxisSettings

Roughly how many times the axis can be zoomed in. A CategoryAxis ignores it and zooms in as far as minZoomCount categories; a DateAxis set to null (its default) zooms in as far as minZoomCount base intervals.

minHeight

Type number | nullInherited from ISpriteSettings

Minimum allowed height in pixels.

minorAxisFillsEnabled

Type undefined | false | trueInherited from IAxisSettingsSince 5.14.0

Creates axis fills for the cells of the minor grid too, not only the main one. The fillRule still decides which of them show.

minWidth

Type number | nullInherited from ISpriteSettings

Minimum allowed width in pixels.

minZoomCount

Type undefined | numberInherited from IAxisSettings

Fewest cells to show at a time, such as categories on a CategoryAxis or baseInterval periods on a DateAxis. The axis can't be zoomed in any further.

More info: Zoom and pan: limiting zoom scope

numberFormatter

Type NumberFormatter | undefinedInherited from ISpriteSettings

A NumberFormatter to use for this element instead of the root's.

More info: /v5/concepts/using-formatters/

opacity

Type undefined | numberDefault 1Inherited from ISpriteSettings

Opacity, from 0 (transparent) to 1 (opaque).

The theme's "default" state has opacity: 1, so show(), and leaving a state that changes opacity, bring it back to 1, not to a value set here. To come back to another value, set it in the "default" state too:

sprite.states.create("default", { opacity: 0.5 }).

paddingBottom

Type undefined | numberInherited from IContainerSettings

Bottom padding in pixels.

paddingLeft

Type undefined | numberInherited from IContainerSettings

Left padding in pixels.

paddingRight

Type undefined | numberInherited from IContainerSettings

Right padding in pixels.

paddingTop

Type undefined | numberInherited from IContainerSettings

Top padding in pixels.

panX

Type undefined | false | trueInherited from IAxisSettings

false keeps this axis in place when the chart is panned horizontally, by dragging or with the mouse wheel.

More info: Zoom and pan: excluding axes from pan or zoom

panY

Type undefined | false | trueInherited from IAxisSettings

false keeps this axis in place when the chart is panned vertically, by dragging or with the mouse wheel.

More info: Zoom and pan: excluding axes from pan or zoom

position

Type "absolute" | "relative"Default "relative"Inherited from ISpriteSettings

Positioning of the element.

"absolute" leaves the element out of its parent's layout and size: it is placed by its x and y only.

renderer

Type RInherited from IAxisSettings

The renderer that draws the axis line, labels, ticks, grid and fills:

AxisRendererX for a horizontal axis, AxisRendererY for a vertical one.

More info: XY chart: axis renderer

reverseChildren

Type undefined | false | trueInherited from IContainerSettingsSince 5.1.1

Lays out the children in reverse order.

role

Type RoleInherited from ISpriteSettings

Element's role.

More info: Accessibility: roles

rotation

Type undefined | numberDefault 0Inherited from ISpriteSettings

Rotation in degrees, clockwise, around the point set by centerX and centerY.

saturate

Type undefined | numberInherited from ISpriteSettingsSince 5.5.0

Saturation.

  • 0 - grayscale

  • 1 - no changes (default)

  • >1 - more saturated IMPORTANT: This setting is not supported in Safari browsers.

More info: Filters

scale

Type undefined | numberDefault 1Inherited from ISpriteSettings

Scale, around the point set by centerX and centerY: below 1 shrinks the element, above 1 enlarges it.

sepia

Type undefined | numberInherited from ISpriteSettingsSince 5.5.0

Sepia tone, from 0 (no changes) to 1 (full sepia).

IMPORTANT: This setting is not supported in Safari browsers.

More info: Filters

setStateOnChildren

Type undefined | false | trueDefault falseInherited from IContainerSettings

Applies every state set on the container to its children too.

More info: Containers: states

showTooltipOn

Type "hover" | "always" | "click"Default "hover"Inherited from ISpriteSettingsSince 5.0.16

When the element's tooltip shows:

  • "hover" (default) - while the pointer is over the element, or after a tap on it until a tap elsewhere.

  • "always" - all the time. To show tooltips of several elements at once, give each its own Tooltip (tooltip).

  • "click" - after a click or tap on the element, until a click anywhere else on the page.

More info: Tooltips: sticky tooltips

snapTooltip

Type undefined | false | trueDefault trueInherited from IAxisSettings

Snaps the tooltip to tooltipLocation in the cell under the cursor, instead of following the cursor exactly.

start

Type undefined | numberDefault 0Inherited from IAxisSettings

Start of the visible (zoomed) part of the axis: 0 is the start of the axis, 1 the end. Set it to pre-zoom: 0.1 hides the first 10%.

More info: Zoom and pan: pre zooming axes

startLocation

Type undefined | numberDefault 0Inherited from ICategoryAxisSettings

Where within the first category the axis starts, from 0 (its start) to 1 (its end): 0.5 cuts off the first half of the first category.

stateAnimationDuration

Type undefined | numberDefault 0Inherited from IEntitySettings

How long, in milliseconds, a switch from one state to another animates.

0 switches at once.

stateAnimationEasing

Type $ease.EasingDefault out(cubic)Inherited from IEntitySettings

Easing of the animated switch from one state to another.

tabindexOrder

Type undefined | numberInherited from ISpriteSettings

An internal order by which focusable elements will be selected within the chart.

More info: Accessibility: focusing elements

templateField

Type undefined | stringInherited from ISpriteSettings

Field in the data item's data object that holds settings for this element, applied over its template's.

More info: Template fields

themes

Type ArrayInherited from IEntitySettings

Themes applied to the element and everything inside it.

themeTags

Type ArrayInherited from IEntitySettings

Tags that theme rules can target. They also count for the element's children, so a rule can match a child by a tag of its parent.

More info: Themes

themeTagsSelf

Type ArrayInherited from IEntitySettings

Tags that theme rules can target, like themeTags, but only for this element, not its children.

More info: Themes

toggleKey

Type "disabled" | "active" | "none" | undefinedInherited from ISpriteSettings

Setting that a click or tap toggles between true and false:

"active" or "disabled". "none" turns toggling off.

tooltip

Type TooltipInherited from IAxisSettings

Tooltip that shows the axis value at the cursor's position.

tooltipHTML

Type undefined | stringInherited from ISpriteSettingsSince 5.2.11

HTML content of the element's tooltip, shown in place of tooltipText.

tooltipLocation

Type undefined | numberDefault 0.5Inherited from IAxisSettings

Where within a cell the tooltip snaps to when snapTooltip is on: 0 the cell's start, 0.5 its middle, 1 its end.

tooltipPosition

Type "fixed" | "pointer"Default "fixed"Inherited from ISpriteSettings

Where the tooltip points: "fixed" at tooltipX and tooltipY, or "pointer" at the pointer, following it.

tooltipText

Type undefined | stringInherited from ISpriteSettings

Text of the element's tooltip. It can hold data placeholders, such as {value}.

tooltipX

Type number | PercentDefault am5.percent(50)Inherited from ISpriteSettings

Where on the element the tooltip points, horizontally: pixels from its left edge, or a percent of its width.

tooltipY

Type number | PercentDefault am5.percent(50)Inherited from ISpriteSettings

Where on the element the tooltip points, vertically: pixels from its top edge, or a percent of its height.

userData

Type anyInherited from IEntitySettings

Any data of your own to keep with the element.

verticalScrollbar

Type ScrollbarInherited from IContainerSettings

A Scrollbar that scrolls the content vertically when it does not fit in the container.

More info: Containers: scrollbar

visible

Type undefined | false | trueDefault trueInherited from ISpriteSettings

Whether the element is shown. Unlike show() and hide(), it does not animate.

wheelable

Type undefined | false | trueInherited from ISpriteSettings

Makes the element receive mouse wheel events. While the pointer is over it, the wheel no longer scrolls the page.

width

Type number | Percent | nullInherited from ISpriteSettings

Width in pixels, or a Percent of the parent's inner width. In a horizontal layout, a percent width is a share of the width the other children leave.

x

Type number | Percent | nullInherited from ISpriteSettings

X position in the parent: pixels from its left edge, or a Percent of its inner width, measured from inside its left padding.

y

Type number | Percent | nullInherited from ISpriteSettings

Y position in the parent: pixels from its top edge, or a Percent of its inner height, measured from inside its top padding.

zoomable

Type undefined | false | trueInherited from IAxisSettings

false makes zoom() do nothing, so the cursor, scrollbars, pinch and mouse wheel can't zoom or scroll the axis. Dragging the plot area still pans it.

zoomOut

Type undefined | false | trueDefault trueInherited from IAxisSettingsSince 5.14.0

false leaves the axis out of the chart's zoom-out: the zoom-out button doesn't reset it, and zooming it doesn't show the button.

zoomX

Type undefined | false | trueInherited from IAxisSettings

false keeps this axis as it is when the mouse wheel zooms the chart horizontally. The cursor, scrollbars and pinch still zoom it; use zoomable to stop those too.

More info: Zoom and pan: excluding axes from pan or zoom

zoomY

Type undefined | false | trueInherited from IAxisSettings

false keeps this axis as it is when the mouse wheel zooms the chart vertically. The cursor, scrollbars and pinch still zoom it; use zoomable to stop those too.

More info: Zoom and pan: excluding axes from pan or zoom