ColorScale.prototype.setNormalizeFunction = function (f) { if (f === 'polynomial') { this.normalize = function (value) { return Math.pow(value, 0.2); }; } else if (f === 'linear') { delete this.normalize; } else { this.normalize = f; } this.setMin(this.clearMinValue); this.setMax(this.clearMaxValue); };
info at phpclasses dot org