1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/**
* If name is specified, returns a scale with the name in existing scales. If name is not specified, returns an object includes all scales.
* @memberOf Core#
* @function
* @example
* core.scale('color'); //returns the color scale;
* core.scale() // returns the scale object
* @param {string} [name]
* @return {object|function}
*/
function scale(name) {
if(!arguments.length) return this.__execs__.scale;
return this.__execs__.scale[name];
}
export default scale;