getColor now gives default color if no argument is passed in

master-patched
Bob Monteverde 12 years ago
parent 134ad1d49d
commit 2f0d1cea9f

@ -255,6 +255,8 @@ nv.utils.windowResize = function(fun){
// If passed an array, wrap it in a function which implements the old default
// behaviour
nv.utils.getColor = function(color) {
if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
if( Object.prototype.toString.call( color ) === '[object Array]' )
return function(d, i) { return d.color || color[i % color.length]; };
else

8
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -42,6 +42,8 @@ nv.utils.windowResize = function(fun){
// If passed an array, wrap it in a function which implements the old default
// behaviour
nv.utils.getColor = function(color) {
if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
if( Object.prototype.toString.call( color ) === '[object Array]' )
return function(d, i) { return d.color || color[i % color.length]; };
else

Loading…
Cancel
Save