The axis component renders human-readable reference marks for scales. This alleviates one of the more tedious tasks in visualizing data.
Default options to use
Options for configuring the scale:
orientation: Where to render the Axis.ticks: Optionally pass ticks (in the domain). Defaults to Scale.ticks.tickFormat: A formatting function for the tick marks. Defaults to Scale.tickFormat.tickCount: How many tickmarks to approximately generate. Defaults to 10.A type alias for the scale. Currently only continuous (including time) and band (via the toRenderable function) scales are supported.
Renders an Axis based on a Scale.
Regardless of orientation, axes are always rendered at the origin. To change the position of the axis with respect to the chart, specify a transform attribute on the containing element.
The elements created by the axis are considered part of its public API. You can apply external stylesheets to customize the axis appearance. An axis consists of a path element of class “domain” representing the extent of the scale’s domain, followed by transformed g elements of class “tick” representing each of the scale’s ticks. Each tick has a line element to draw the tick line, and a text element for the tick label. For example, here is a typical bottom-oriented axis: