Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function legendType(spec, scaleType) {
var type = spec.type || Symbols;
if (!spec.type && scaleCount(spec) === 1 && (spec.fill || spec.stroke)) {
type = isContinuous(scaleType) ? Gradient
: isDiscretizing(scaleType) ? Discrete
: Symbols;
}
return type !== Gradient ? type
: isDiscretizing(scaleType) ? Discrete
: Gradient;
}
function legendType(spec, scaleType) {
var type = spec.type || Symbols;
if (!spec.type && scaleCount(spec) === 1 && (spec.fill || spec.stroke)) {
type = isContinuous(scaleType) ? Gradient
: isDiscretizing(scaleType) ? Discrete
: Symbols;
}
return type !== Gradient ? type
: isDiscretizing(scaleType) ? Discrete
: Gradient;
}