I have data with high cardinality, and I need to combine two or more sets of discrete colors. How do I do it? For example, I have used the “dark2” scheme in the code-snippet below. How do I add “category10” or pastel1" to “dark2” for use in the same graph?
You might want to try color: {range: d3.schemeDark2.concat(d3.schemeCategory10) }, or define a list of cateogorical colors yourself, and feed it as an array color: {range: ["#fff", "#ccc",…] }.
Thanks so much! How do I concat more that 2 schemes?
And how does the code appear
(1 )in the domain, range format,
and (2) when creating swatches for legend?