fix: annotation broken (#20651)

* fix: annotation broken

* fix UT

* add annotation data to mixed timeseries chart
This commit is contained in:
Yongjie Zhao
2022-07-12 06:23:57 +08:00
committed by GitHub
parent 6ee9be203a
commit 7f918a4ec0
7 changed files with 75 additions and 53 deletions

View File

@@ -48,7 +48,10 @@ import {
getColtypesMapping,
getLegendProps,
} from '../utils/series';
import { extractAnnotationLabels } from '../utils/annotation';
import {
extractAnnotationLabels,
getAnnotationData,
} from '../utils/annotation';
import {
extractForecastSeriesContext,
extractForecastValuesFromTooltipParams,
@@ -81,11 +84,11 @@ export default function transformProps(
filterState,
datasource,
theme,
annotationData = {},
} = chartProps;
const { verboseMap = {} } = datasource;
const data1 = (queriesData[0].data || []) as TimeseriesDataRecord[];
const data2 = (queriesData[1].data || []) as TimeseriesDataRecord[];
const annotationData = getAnnotationData(chartProps);
const {
area,