Render the axis to the given context.
A selection of SVG containers (either SVG or G elements).
Render the axis to the given context.
A transition defined on SVG containers (either SVG or G elements).
Get an array containing the currently set arguments to be passed into scale.ticks and scale.tickFormat.
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
An array containing a single element representing the count, i.e. number of ticks to be rendered.
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
An array containing two elements. The first element represents the count, i.e. number of ticks to be rendered. The second element is a string representing the format specifier to customize how the tick values are formatted.
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. Use with a TIME SCALE ONLY.
An array containing a single element representing a time interval used to generate date-based ticks. This is typically a TimeInterval/CountableTimeInterval as defined in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15).
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. Use with a TIME SCALE ONLY.
An array containing two elements. The first element represents a time interval used to generate date-based ticks. This is typically a TimeInterval/CountableTimeInterval as defined in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15). The second element is a string representing the format specifier to customize how the tick values are formatted.
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
An array with arguments suitable for the scale to be used for tick generation
Returns the currently set tick format function, which defaults to null.
Sets the tick format function and returns the axis.
A function mapping a value from the axis Domain to a formatted string for display purposes. When invoked, the format function is also passed a second argument representing the zero-based index of the tick label in the array of generated tick labels.
Reset the tick format function. A null format indicates that the scale’s default formatter should be used, which is generated by calling scale.tickFormat. In this case, the arguments specified by axis.tickArguments are likewise passed to scale.tickFormat.
null
Get the current padding, which defaults to 3.
Set the current padding and return the axis.
Padding in pixels (Default is 3).
Get the current inner tick size, which defaults to 6.
Set the inner and outer tick size to the specified value and return the axis.
Tick size in pixels (Default is 6).
Get the current inner tick size, which defaults to 6. The inner tick size controls the length of the tick lines, offset from the native position of the axis.
Set the inner tick size to the specified value and return the axis. The inner tick size controls the length of the tick lines, offset from the native position of the axis.
Tick size in pixels (Default is 6).
Get the current outer tick size, which defaults to 6. The outer tick size controls the length of the square ends of the domain path, offset from the native position of the axis. Thus, the “outer ticks” are not actually ticks but part of the domain path, and their position is determined by the associated scale’s domain extent. Thus, outer ticks may overlap with the first or last inner tick. An outer tick size of 0 suppresses the square ends of the domain path, instead producing a straight line.
Set the current outer tick size and return the axis. The outer tick size controls the length of the square ends of the domain path, offset from the native position of the axis. Thus, the “outer ticks” are not actually ticks but part of the domain path, and their position is determined by the associated scale’s domain extent. Thus, outer ticks may overlap with the first or last inner tick. An outer tick size of 0 suppresses the square ends of the domain path, instead producing a straight line.
Tick size in pixels (Default is 6).
Returns the current tick values, which defaults to null.
Specified values to be used for ticks rather than using the scale’s automatic tick generator. The explicit tick values take precedent over the tick arguments set by axis.tickArguments. However, any tick arguments will still be passed to the scale’s tickFormat function if a tick format is not also set.
An array with values from the Domain of the scale underlying the axis.
Clears any previously-set explicit tick values and reverts back to the scale’s tick generator.
null
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
Number of ticks that should be rendered
An optional format specifier to customize how the tick values are formatted.
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. Use with a TIME SCALE ONLY.
A time interval used to generate date-based ticks. This is typically a TimeInterval/CountableTimeInterval as defined in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15).
An optional format specifier to customize how the tick values are formatted.
Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
Generated using TypeDoc
Interface defining an axis generator. The generic is the type of the axis domain