docs: function (chart, userOptions) {
  
  
              var isXAxis = userOptions.isX,
                axis = this;
  
              // Flag, is the axis horizontal
              axis.horiz = chart.inverted ? !isXAxis : isXAxis;
  
              // Flag, isXAxis
              axis.isXAxis = isXAxis;
              axis.coll = isXAxis ? 'xAxis' : 'yAxis';
  
              axis.opposite = userOptions.opposite; // needed in setOptions
              axis.side = userOptions.side || (axis.horiz ?
                  (axis.opposite ? 0 : 2) : // top : bottom
                  (axis.opposite ? 1 : 3));  // right : left
  
              axis.setOptions(userOptions);
  
  
              var options = this.options,
                type = options.type,
                isDatetimeAxis = type === 'datetime';
  
              axis.labelFormatter = options.labels.formatter || axis.defaultLabelFormatter; // can be overwritten by dynamic format
  
  
              // Flag, stagger lines or not
              axis.userOptions = userOptions;
  
              //axis.axisTitleMargin = UNDEFINED,// = options.title.margin,
              axis.minPixelPadding = 0;
              //axis.ignoreMinPadding = UNDEFINED; // can be set to true by a column or bar series
              //axis.ignoreMaxPadding = UNDEFINED;
  
              axis.chart = chart;
              axis.reversed = options.reversed;
              axis.zoomEnabled = options.zoomEnabled !== false;
  
              // Initial categories
              axis.categories = options.categories || type === 'category';
              axis.names = [];
  
              // Elements
              //axis.axisGroup = UNDEFINED;
              //axis.gridGroup = UNDEFINED;
              //axis.axisTitle = UNDEFINED;
              //axis.axisLine = UNDEFINED;
  
              // Shorthand types
              axis.isLog = type === 'logarithmic';
              axis.isDatetimeAxis = isDatetimeAxis;
  
              // Flag, if axis is linked to another axis
              axis.isLinked = defined(options.linkedTo);
              // Linked axis.
              //axis.linkedParent = UNDEFINED;
  
              // Tick positions
              //axis.tickPositions = UNDEFINED; // array containing predefined positions
              // Tick intervals
              //axis.tickInterval = UNDEFINED;
              //axis.minorTickInterval = UNDEFINED;
  
              axis.tickmarkOffset = (axis.categories && options.tickmarkPlacement === 'between' &&
              pick(options.tickInterval, 1) === 1) ? 0.5 : 0; // #3202
  
              // Major ticks
              axis.ticks = {};
              axis.labelEdge = [];
              // Minor ticks
              axis.minorTicks = {};
              //axis.tickAmount = UNDEFINED;
  
              // List of plotLines/Bands
              axis.plotLinesAndBands = [];
  
              // Alternate bands
              axis.alternateBands = {};
  
              // Axis metrics
              //axis.left = UNDEFINED;
              //axis.top = UNDEFINED;
              //axis.width = UNDEFINED;
              //axis.height = UNDEFINED;
              //axis.bottom = UNDEFINED;
              //axis.right = UNDEFINED;
              //axis.transA = UNDEFINED;
              //axis.transB = UNDEFINED;
              //axis.oldTransA = UNDEFINED;
              axis.len = 0;
              //axis.oldMin = UNDEFINED;
              //axis.oldMax = UNDEFINED;
              //axis.oldUserMin = UNDEFINED;
              //axis.oldUserMax = UNDEFINED;
              //axis.oldAxisLength = UNDEFINED;
              axis.minRange = axis.userMinRange = options.minRange || options.maxZoom;
              axis.range = options.range;
              axis.offset = options.offset || 0;
  
  
              // Dictionary for stacks
              axis.stacks = {};
              axis.oldStacks = {};
  
              // Min and max in the data
              //axis.dataMin = UNDEFINED,
              //axis.dataMax = UNDEFINED,
  
              // The axis range
              axis.max = null;
              axis.min = null;
  
              // User set min and max
              //axis.userMin = UNDEFINED,
              //axis.userMax = UNDEFINED,
  
              // Crosshair options
              axis.crosshair = pick(options.crosshair, splat(chart.options.tooltip.crosshairs)[isXAxis ? 0 : 1], false);
              // Run Axis
  
              var eventType,
                events = axis.options.events;
  
              // Register
              if (inArray(axis, chart.axes) === -1) { // don't add it again on Axis.update()
                  if (isXAxis && !this.isColorAxis) { // #2713
                      chart.axes.splice(chart.xAxis.length, 0, axis);
                  } else {
                      chart.axes.push(axis);
                  }
  
                  chart[axis.coll].push(axis);
              }
  
              axis.series = axis.series || []; // populated by Series
  
              // inverted charts have reversed xAxes as default
              if (chart.inverted && isXAxis && axis.reversed === UNDEFINED) {
                  axis.reversed = true;
              }
  
              axis.removePlotBand = axis.removePlotBandOrLine;
              axis.removePlotLine = axis.removePlotBandOrLine;
  
  
              // register event listeners
              for (eventType in events) {
                  addEvent(axis, eventType, events[eventType]);
              }
  
              // extend logarithmic axis
              if (axis.isLog) {
                  axis.val2lin = log2lin;
                  axis.lin2val = lin2log;
              }
          }