mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix(plugin-chart-echarts): [feature parity] annotation line chart color not working (#19758)
This commit is contained in:
parent
d5ea537b0e
commit
11562971fb
@ -236,6 +236,8 @@ export default function transformProps(
|
|||||||
markerSize,
|
markerSize,
|
||||||
data1,
|
data1,
|
||||||
annotationData,
|
annotationData,
|
||||||
|
colorScale,
|
||||||
|
sliceId,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -259,6 +259,8 @@ export default function transformProps(
|
|||||||
markerSize,
|
markerSize,
|
||||||
data,
|
data,
|
||||||
annotationData,
|
annotationData,
|
||||||
|
colorScale,
|
||||||
|
sliceId,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -418,9 +418,11 @@ export function transformTimeseriesAnnotation(
|
|||||||
markerSize: number,
|
markerSize: number,
|
||||||
data: TimeseriesDataRecord[],
|
data: TimeseriesDataRecord[],
|
||||||
annotationData: AnnotationData,
|
annotationData: AnnotationData,
|
||||||
|
colorScale: CategoricalColorScale,
|
||||||
|
sliceId?: number,
|
||||||
): SeriesOption[] {
|
): SeriesOption[] {
|
||||||
const series: SeriesOption[] = [];
|
const series: SeriesOption[] = [];
|
||||||
const { hideLine, name, opacity, showMarkers, style, width } = layer;
|
const { hideLine, name, opacity, showMarkers, style, width, color } = layer;
|
||||||
const result = annotationData[name];
|
const result = annotationData[name];
|
||||||
if (isTimeseriesAnnotationResult(result)) {
|
if (isTimeseriesAnnotationResult(result)) {
|
||||||
result.forEach(annotation => {
|
result.forEach(annotation => {
|
||||||
@ -435,6 +437,7 @@ export function transformTimeseriesAnnotation(
|
|||||||
opacity: parseAnnotationOpacity(opacity),
|
opacity: parseAnnotationOpacity(opacity),
|
||||||
type: style as ZRLineType,
|
type: style as ZRLineType,
|
||||||
width: hideLine ? 0 : width,
|
width: hideLine ? 0 : width,
|
||||||
|
color: color || colorScale(name, sliceId),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user