Skip to content

Commit

Permalink
fix(plugin-chart-echarts): [feature parity] annotation line chart col…
Browse files Browse the repository at this point in the history
…or not working (apache#19758)
  • Loading branch information
stephenLYZ authored May 11, 2022
1 parent 8d562ce commit cd3b802
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ export default function transformProps(
markerSize,
data1,
annotationData,
colorScale,
sliceId,
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ export default function transformProps(
markerSize,
data,
annotationData,
colorScale,
sliceId,
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,11 @@ export function transformTimeseriesAnnotation(
markerSize: number,
data: TimeseriesDataRecord[],
annotationData: AnnotationData,
colorScale: CategoricalColorScale,
sliceId?: number,
): 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];
if (isTimeseriesAnnotationResult(result)) {
result.forEach(annotation => {
Expand All @@ -435,6 +437,7 @@ export function transformTimeseriesAnnotation(
opacity: parseAnnotationOpacity(opacity),
type: style as ZRLineType,
width: hideLine ? 0 : width,
color: color || colorScale(name, sliceId),
},
});
});
Expand Down

0 comments on commit cd3b802

Please sign in to comment.