We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8496dd commit 53ddedbCopy full SHA for 53ddedb
src/legends.js
@@ -46,8 +46,8 @@ function legendColor(color, {
46
legend = true,
47
...options
48
}) {
49
+ if (color?.domain === undefined) return;
50
if (legend === true) legend = color.type === "ordinal" ? "swatches" : "ramp";
- if (color.domain === undefined) return;
51
switch (`${legend}`.toLowerCase()) {
52
case "swatches": return legendSwatches(color, options);
53
case "ramp": return legendRamp(color, options);
0 commit comments