mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
feat: improve color consistency (save all labels) (#19038)
This commit is contained in:
@@ -71,13 +71,14 @@ class CustomHistogram extends React.PureComponent {
|
||||
xAxisLabel,
|
||||
yAxisLabel,
|
||||
showLegend,
|
||||
sliceId,
|
||||
} = this.props;
|
||||
|
||||
const colorFn = CategoricalColorNamespace.getScale(colorScheme);
|
||||
const keys = data.map(d => d.key);
|
||||
const colorScale = scaleOrdinal({
|
||||
domain: keys,
|
||||
range: keys.map(x => colorFn(x)),
|
||||
range: keys.map(x => colorFn(x, sliceId)),
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user