mirror of
https://github.com/apache/superset.git
synced 2026-04-22 17:45:21 +00:00
feat: improve color consistency (save all labels) (#19038)
This commit is contained in:
@@ -107,6 +107,7 @@ export default function transformProps(
|
||||
intervalColorIndices,
|
||||
valueFormatter,
|
||||
emitFilter,
|
||||
sliceId,
|
||||
}: EchartsGaugeFormData = { ...DEFAULT_GAUGE_FORM_DATA, ...formData };
|
||||
const data = (queriesData[0]?.data || []) as DataRecord[];
|
||||
const numberFormatter = getNumberFormatter(numberFormat);
|
||||
@@ -147,7 +148,7 @@ export default function transformProps(
|
||||
value: data_point[getMetricLabel(metric as QueryFormMetric)] as number,
|
||||
name,
|
||||
itemStyle: {
|
||||
color: colorFn(index),
|
||||
color: colorFn(index, sliceId),
|
||||
},
|
||||
title: {
|
||||
offsetCenter: [
|
||||
@@ -175,7 +176,7 @@ export default function transformProps(
|
||||
item = {
|
||||
...item,
|
||||
itemStyle: {
|
||||
color: colorFn(index),
|
||||
color: colorFn(index, sliceId),
|
||||
opacity: OpacityEnum.SemiTransparent,
|
||||
},
|
||||
detail: {
|
||||
|
||||
Reference in New Issue
Block a user