# Class: c3.Axis Abstract

Defined in: | js/c3-plot.coffee
Inherits: | c3.Chart

## Overview

This class is abstract.
TODO: Normalize the zoom/pan implementation from c3.Plot.Zoomable
TODO: Ability to specify tick counts for ordinal scales?
TODO: Remove dependency on d3.axis for more flexibility, cleaner implementation, and performance?

An Axis visualizes a set of tick marks and units based on the supplied D3 scale. This is an abstract class, please create a {c3.Axis.x} or {c3.Axis.y}.

Axes may be attached to XY Plots or managed as a seperate DOM element for layout flexibility.

### Author:

- Douglas Armstrong

## Direct Known Subclasses

c3.Axis.X c3.Axis.Y

## Variables Summary

version =

      0.1

type =

      'axis'

_next_uid =

      0

scale =

      undefined

  [d3.scale, Boolean] Scale where the domain() specifies the units to display in the axis. c3 will automatically set the range(). If this axis is part of a plot, then the scale will default to the plot's horizontal or veritcal scale. Set to false to disable the scale from being drawn.

orient =

      undefined

  [String] Axis orientation. Use bottom or top for an X axis and left or right for a Y axis.

grid =

      false

  [Boolean] Set to true to draw grid lines as well as the axis

label =

      undefined

  [String] Text label for this axis

ticks =

      true

  [Boolean] Enable tick marks and labels

tick_label =

      true

  [Boolean, Function] Formater function for the tick label. Set to `true` for displaying the default tick values. _See d3.format_.

tick_values =

      undefined

  [Array] An array of manually set tick values to use instead of the scale's automatic tick generation.

tick_count =

      undefined

  [Number] Specify number of ticks to generate

tick_size =

      6

  [Number] Size of the tick marks in pixels

path_size =

      2

  [Number] Width of the path that forms a line along the length of the axis

axis_size =

      undefined

  [Number] The overall width of a horizontal axis or height of a vertical axis

### Variable inherited from c3.Chart

type class options content_options anchor height width anchor_styles handlers

## Instance Method Summary

- # (void) _init() Bound
- # (void) _draw() Bound

## Inherited Method Summary

### Methods inherited from c3.Chart

#init #style #render #resize #redraw #restyle #_prep #_init #size #_size #update #_update #draw #_draw #_style

## Constructor Details

# (void) constructor(opt)

## Instance Method Details

# (void) _init() Bound

# (void) _draw() Bound

Quickly fuzzy find classes, mixins, methods, file:

- T Open fuzzy finder dialog

Control the navigation frame:

- L Toggle list view
- C Show class list
- I Show mixin list
- F Show file list
- M Show method list
- E Show extras list

You can focus and blur the search input:

- S Focus search input
- Esc Blur search input