feat: improve color consistency (save all labels) (#19038)

This commit is contained in:
Stephen Liu
2022-03-21 15:20:04 +08:00
committed by GitHub
parent e1d0b83885
commit dc575080d7
68 changed files with 690 additions and 137 deletions

View File

@@ -119,6 +119,7 @@ function Icicle(element, props) {
partitionThreshold,
useRichTooltip,
timeSeriesOption = 'not_time',
sliceId,
} = props;
const div = d3.select(element);
@@ -385,7 +386,7 @@ function Icicle(element, props) {
// Apply color scheme
g.selectAll('rect').style('fill', d => {
d.color = colorFn(d.name);
d.color = colorFn(d.name, sliceId);
return d.color;
});

View File

@@ -30,6 +30,7 @@ export default function transformProps(chartProps) {
partitionThreshold,
richTooltip,
timeSeriesOption,
sliceId,
} = formData;
const { verboseMap } = datasource;
@@ -48,5 +49,6 @@ export default function transformProps(chartProps) {
timeSeriesOption,
useLogScale: logScale,
useRichTooltip: richTooltip,
sliceId,
};
}