mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Nope, do need that while
This commit is contained in:
parent
b8e54c865b
commit
5ffe6f9519
1 changed files with 4 additions and 1 deletions
|
@ -42,7 +42,10 @@ define((require) => (Private, config) => {
|
|||
const allColors = _(this.mapping).values().union(configColors).value();
|
||||
const colorPalette = createColorPalette(allColors.length + keysToMap.length);
|
||||
let newColors = _.difference(colorPalette, allColors);
|
||||
newColors = newColors.concat(_.sample(allColors, keysToMap.length - newColors.length));
|
||||
|
||||
while (keysToMap.length > newColors.length) {
|
||||
newColors = newColors.concat(_.sample(allColors, keysToMap.length - newColors.length));
|
||||
}
|
||||
|
||||
_.merge(this.mapping, _.zipObject(keysToMap, newColors));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue