Skip to content
Snippets Groups Projects
Commit ca140c3a authored by Alexander Kraev's avatar Alexander Kraev Committed by Tom Robinson
Browse files

shrink color array in ChoroplethMap vis when domain has lesser size (#9692)

parent f8b94065
No related branches found
No related tags found
No related merge requests found
......@@ -250,7 +250,11 @@ export default class ChoroplethMap extends Component {
domain.push(getRowValue(row));
}
const heatMapColors = settings["map.colors"] || HEAT_MAP_COLORS;
const _heatMapColors = settings["map.colors"] || HEAT_MAP_COLORS;
const heatMapColors =
domain.length < _heatMapColors.length
? _heatMapColors.slice(_heatMapColors.length - domain.length)
: _heatMapColors;
const groups = ss.ckmeans(domain, heatMapColors.length);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment