docs/a.js
function(generationOptions, dataRange) {
				var ticks = [];
				// To get a "nice" value for the tick spacing, we will use the appropriately named
				// "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
				// for details.

				var spacing;
				if (generationOptions.stepSize && generationOptions.stepSize > 0) {
					spacing = generationOptions.stepSize;
				} else {
					var niceRange = helpers.niceNum(dataRange.max - dataRange.min, false);
					spacing = helpers.niceNum(niceRange / (generationOptions.maxTicks - 1), true);
				}
				var niceMin = Math.floor(dataRange.min / spacing) * spacing;
				var niceMax = Math.ceil(dataRange.max / spacing) * spacing;

				// If min, max and stepSize is set and they make an evenly spaced scale use it.
				if (generationOptions.min && generationOptions.max && generationOptions.stepSize) {
					var minMaxDeltaDivisibleByStepSize = ((generationOptions.max - generationOptions.min) % generationOptions.stepSize) === 0;
					if (minMaxDeltaDivisibleByStepSize) {
						niceMin = generationOptions.min;
						niceMax = generationOptions.max;
					}
				}

				var numSpaces = (niceMax - niceMin) / spacing;
				// If very close to our rounded value, use it.
				if (helpers.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {
					numSpaces = Math.round(numSpaces);
				} else {
					numSpaces = Math.ceil(numSpaces);
				}

				// Put the values into the ticks array
				ticks.push(generationOptions.min !== undefined ? generationOptions.min : niceMin);
				for (var j = 1; j < numSpaces; ++j) {
					ticks.push(niceMin + (j * spacing));
				}
				ticks.push(generationOptions.max !== undefined ? generationOptions.max : niceMax);

				return ticks;
			}
function(generationOptions, dataRange) {
				var ticks = [];
				// To get a "nice" value for the tick spacing, we will use the appropriately named
				// "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
				// for details.

				var spacing;
				if (generationOptions.stepSize && generationOptions.stepSize > 0) {
					spacing = generationOptions.stepSize;
				} else {
					var niceRange = helpers.niceNum(dataRange.max - dataRange.min, false);
					spacing = helpers.niceNum(niceRange / (generationOptions.maxTicks - 1), true);
				}
				var niceMin = Math.floor(dataRange.min / spacing) * spacing;
				var niceMax = Math.ceil(dataRange.max / spacing) * spacing;

				// If min, max and stepSize is set and they make an evenly spaced scale use it.
				if (generationOptions.min && generationOptions.max && generationOptions.stepSize) {
					var minMaxDeltaDivisibleByStepSize = ((generationOptions.max - generationOptions.min) % generationOptions.stepSize) === 0;
					if (minMaxDeltaDivisibleByStepSize) {
						niceMin = generationOptions.min;
						niceMax = generationOptions.max;
					}
				}

				var numSpaces = (niceMax - niceMin) / spacing;
				// If very close to our rounded value, use it.
				if (helpers.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {
					numSpaces = Math.round(numSpaces);
				} else {
					numSpaces = Math.ceil(numSpaces);
				}

				// Put the values into the ticks array
				ticks.push(generationOptions.min !== undefined ? generationOptions.min : niceMin);
				for (var j = 1; j < numSpaces; ++j) {
					ticks.push(niceMin + (j * spacing));
				}
				ticks.push(generationOptions.max !== undefined ? generationOptions.max : niceMax);

				return ticks;
			}
function ( generationOptions , dataRange ) { var ticks = [ ] ; // To get a "nice" value for the tick spacing, we will use the appropriately named // "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks // for details. var spacing ; if ( generationOptions . stepSize && generationOptions . stepSize > 0 ) { spacing = generationOptions . stepSize ; } else { var niceRange = helpers . niceNum ( dataRange . max - dataRange . min , false ) ; spacing = helpers . niceNum ( niceRange / ( generationOptions . maxTicks - 1 ) , true ) ; } var niceMin = Math . floor ( dataRange . min / spacing ) * spacing ; var niceMax = Math . ceil ( dataRange . max / spacing ) * spacing ; // If min, max and stepSize is set and they make an evenly spaced scale use it. if ( generationOptions . min && generationOptions . max && generationOptions . stepSize ) { var minMaxDeltaDivisibleByStepSize = ( ( generationOptions . max - generationOptions . min ) % generationOptions . stepSize ) === 0 ; if ( minMaxDeltaDivisibleByStepSize ) { niceMin = generationOptions . min ; niceMax = generationOptions . max ; } } var numSpaces = ( niceMax - niceMin ) / spacing ; // If very close to our rounded value, use it. if ( helpers . almostEquals ( numSpaces , Math . round ( numSpaces ) , spacing / 1000 ) ) { numSpaces = Math . round ( numSpaces ) ; } else { numSpaces = Math . ceil ( numSpaces ) ; } // Put the values into the ticks array ticks . push ( generationOptions . min !== undefined ? generationOptions . min : niceMin ) ; for ( var j = 1 ; j < numSpaces ; ++ j ) { ticks . push ( niceMin + ( j * spacing ) ) ; } ticks . push ( generationOptions . max !== undefined ? generationOptions . max : niceMax ) ; return ticks ; }
Interface for the options provided to the numeric tick generator
@interface INumericTickGenerationOptions
 
The maximum number of ticks to display
@name INumericTickGenerationOptions#maxTicks
@type Number
 
The distance between each tick.
@name INumericTickGenerationOptions#stepSize
@type Number
@optional
 
Forced minimum for the ticks. If not specified, the minimum of the data range is used to calculate the tick minimum
@name INumericTickGenerationOptions#min
@type Number
@optional
 
The maximum value of the ticks. If not specified, the maximum of the data range is used to calculate the tick maximum
@name INumericTickGenerationOptions#max
@type Number
@optional
 
Generate a set of linear ticks
@method Chart.Ticks.generators.linear
@param generationOptions {INumericTickGenerationOptions} the options used to generate the ticks
@param dataRange {IRange} the range of the data
@returns {Array<Number>} array of tick values
Interface for the options provided to the numeric tick generator