code: function computeFlexCategoryTraits(index, ruler, options) {
  	var pixels = ruler.pixels;
  	var curr = pixels[index];
  	var prev = index > 0 ? pixels[index - 1] : null;
  	var next = index < pixels.length - 1 ? pixels[index + 1] : null;
  	var percent = options.categoryPercentage;
  	var start, size;
  
  	if (prev === null) {
  		// first data: its size is double based on the next point or,
  		// if it's also the last data, we use the scale size.
  		prev = curr - (next === null ? ruler.end - ruler.start : next - curr);
  	}
  
  	if (next === null) {
  		// last data: its size is also double based on the previous point.
  		next = curr + curr - prev;
  	}
  
  	start = curr - (curr - Math.min(prev, next)) / 2 * percent;
  	size = Math.abs(next - prev) / 2 * percent;
  
  	return {
  		chunk: size / ruler.stackCount,
  		ratio: options.barPercentage,
  		start: start
  	};
  }
docs: Computes an "optimal" category that globally arranges bars side by side (no gap when
  percentage options are 1), based on the previous and following categories. This mode
  generates bars with different widths when data are not evenly spaced.
  @private