chore: make TS enums strictly PascalCase (#26875)

This commit is contained in:
Ville Brofeldt
2024-01-31 17:40:44 -08:00
committed by GitHub
parent 959a5a5ad6
commit 19f8405bc0
362 changed files with 2002 additions and 2032 deletions

View File

@@ -25,13 +25,13 @@ import {
AnnotationLayer,
AnnotationOpacity,
AnnotationType,
AxisType,
DataRecord,
evalExpression,
FormulaAnnotationLayer,
isRecordAnnotationResult,
isTableAnnotationLayer,
isTimeseriesAnnotationResult,
AxisType,
} from '@superset-ui/core';
import { EchartsTimeseriesChartProps } from '../types';
import { EchartsMixedTimeseriesProps } from '../MixedTimeseries/types';
@@ -46,7 +46,7 @@ export function evalFormula(
return data.map(row => {
let value = row[xAxis];
if (xAxisType === 'time') {
if (xAxisType === AxisType.Time) {
value = new Date(value as string).getTime();
}
return [value, evalExpression(expression, (value || 0) as number)];