Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
items,
attr,
formatter: scale.formatter,
container,
position,
});
if (legendCfg.showTitle) {
_.mix(legendCfg, { title: scale.field });
}
let legend;
if (attr.type === 'color') {
legend = new Color(legendCfg);
} else if (attr.type === 'size') {
legend = new Size(legendCfg);
} else {
return;
}
this.bindFilterEvent(legend, scale);
return legend;
}