fix(line-chart): Formula Annotations on Line Charts are broken (#20687)

This commit is contained in:
Stephen Liu
2022-07-13 16:42:11 +08:00
committed by GitHub
parent bd6037ef50
commit acdb271422
7 changed files with 63 additions and 18 deletions

View File

@@ -52,7 +52,12 @@ import {
import { MarkLine1DDataItemOption } from 'echarts/types/src/component/marker/MarkLineModel';
import { extractForecastSeriesContext } from '../utils/forecast';
import { ForecastSeriesEnum, LegendOrientation, StackType } from '../types';
import {
AxisType,
ForecastSeriesEnum,
LegendOrientation,
StackType,
} from '../types';
import { EchartsTimeseriesSeriesType } from './types';
import {
@@ -250,6 +255,8 @@ export function transformSeries(
export function transformFormulaAnnotation(
layer: FormulaAnnotationLayer,
data: TimeseriesDataRecord[],
xAxisCol: string,
xAxisType: AxisType,
colorScale: CategoricalColorScale,
sliceId?: number,
): SeriesOption {
@@ -267,7 +274,7 @@ export function transformFormulaAnnotation(
},
type: 'line',
smooth: true,
data: evalFormula(layer, data),
data: evalFormula(layer, data, xAxisCol, xAxisType),
symbolSize: 0,
};
}