Skip to content

Instantly share code, notes, and snippets.

Avatar

Claudia Romano claudia-romano

View GitHub Profile
@igodorogea
igodorogea / nice-scale.js
Created Jan 11, 2017
Javascript - Algorithm for Optimal Scaling on a Chart Axis (Nice Numbers for Graph Labels)
View nice-scale.js
function NiceScale (lowerBound, upperBound, _maxTicks) {
var maxTicks = _maxTicks || 10;
var tickSpacing;
var range;
var niceLowerBound;
var niceUpperBound;
calculate();
View essential-javascript-links.md