Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
da730 committed Jun 7, 2024
1 parent 30cc134 commit 0e7b052
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,6 @@
import { ChartType } from '../../../../../common/typings';
import { InsightType, type InsightAlgorithm } from '../../../types';

const defaultInsightAlgorithms: InsightAlgorithm[] = [
{
name: 'test',
chartType: [ChartType.BarChart, ChartType.LineChart],
insightType: InsightType.Outlier,
algorithmFunction: (context: any) => {
return [
{
type: InsightType.Outlier, // Insight type
data: [],
text: [],
significant: 0.1
}
];
}
},
{
name: 'test2',
chartType: [ChartType.BarChart, ChartType.LineChart],
insightType: InsightType.ExtremeValue,
algorithmFunction: (context: any) => {
return [
{
type: InsightType.ExtremeValue, // Insight type
data: [],
text: [],
significant: 0.2
}
];
}
}
];
const defaultInsightAlgorithms: InsightAlgorithm[] = [];

export default defaultInsightAlgorithms;
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const executeInsightAlgo: Transformer<InsightContext & DataProcessOutput, Extrac
const { chartType: algoSupportedChartType, algorithmFunction } = algoInfo;
if (algoSupportedChartType.includes(chartType)) {
const res = algorithmFunction(insightAlgorithmContext);
insights.push(res);
insights.push(...res);
}
});

Expand Down

0 comments on commit 0e7b052

Please sign in to comment.