mirror of
https://github.com/apache/superset.git
synced 2026-04-24 02:25:13 +00:00
feat: improve color consistency (save all labels) (#19038)
This commit is contained in:
@@ -125,6 +125,7 @@ export default function transformProps(
|
||||
xAxisTitleMargin,
|
||||
yAxisTitleMargin,
|
||||
yAxisTitlePosition,
|
||||
sliceId,
|
||||
}: EchartsTimeseriesFormData = { ...DEFAULT_FORM_DATA, ...formData };
|
||||
|
||||
const colorScale = CategoricalColorNamespace.getScale(colorScheme as string);
|
||||
@@ -198,6 +199,7 @@ export default function transformProps(
|
||||
showValueIndexes,
|
||||
thresholdValues,
|
||||
richTooltip,
|
||||
sliceId,
|
||||
});
|
||||
if (transformedSeries) series.push(transformedSeries);
|
||||
});
|
||||
@@ -217,7 +219,9 @@ export default function transformProps(
|
||||
.filter((layer: AnnotationLayer) => layer.show)
|
||||
.forEach((layer: AnnotationLayer) => {
|
||||
if (isFormulaAnnotationLayer(layer))
|
||||
series.push(transformFormulaAnnotation(layer, data, colorScale));
|
||||
series.push(
|
||||
transformFormulaAnnotation(layer, data, colorScale, sliceId),
|
||||
);
|
||||
else if (isIntervalAnnotationLayer(layer)) {
|
||||
series.push(
|
||||
...transformIntervalAnnotation(
|
||||
@@ -225,11 +229,18 @@ export default function transformProps(
|
||||
data,
|
||||
annotationData,
|
||||
colorScale,
|
||||
sliceId,
|
||||
),
|
||||
);
|
||||
} else if (isEventAnnotationLayer(layer)) {
|
||||
series.push(
|
||||
...transformEventAnnotation(layer, data, annotationData, colorScale),
|
||||
...transformEventAnnotation(
|
||||
layer,
|
||||
data,
|
||||
annotationData,
|
||||
colorScale,
|
||||
sliceId,
|
||||
),
|
||||
);
|
||||
} else if (isTimeseriesAnnotationLayer(layer)) {
|
||||
series.push(
|
||||
|
||||
Reference in New Issue
Block a user