Skip to content

Commit 894b3ab

Browse files
committed
2 parents 9b24889 + 05866ad commit 894b3ab

3 files changed

Lines changed: 3 additions & 21 deletions

File tree

frontend/src/charts/lineChart.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ import {
1111
Legend,
1212
Filler,
1313
} from "chart.js";
14-
import annotationPlugin, { AnnotationOptions } from 'chartjs-plugin-annotation';
1514

1615

1716
// Register Chart.js components
1817
Chart.register(
19-
annotationPlugin,
2018
LineController,
2119
LineElement,
2220
PointElement,
@@ -33,16 +31,11 @@ type LineChartProps = {
3331
// Define any props if necessary, or leave as an empty object
3432
};
3533

36-
declare module 'chart.js' {
37-
interface PluginOptionsByType<TType extends string> {
38-
annotation?: AnnotationOptions;
39-
}
40-
}
41-
4234
const LineChart: React.FC<LineChartProps> = memo(function LineChart() {
4335

4436
const { comparison } = useBenchmarkContext();
4537

38+
// @ts-ignore
4639
const [chart, setChart] = useState<Chart | null>(null);
4740
const canvas = useRef<HTMLCanvasElement | null>(null);
4841

@@ -105,17 +98,6 @@ const LineChart: React.FC<LineChartProps> = memo(function LineChart() {
10598
},
10699
boxHeight: 5
107100
},
108-
annotation: {
109-
annotations: {
110-
line1: {
111-
type: 'line',
112-
yMin: 600,
113-
yMax: 600,
114-
borderColor: 'rgb(255, 99, 132)',
115-
borderWidth: 10,
116-
}
117-
}
118-
}
119101
}
120102
}
121103
}

frontend/src/partials/Compare.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import intel_xeon_logo from "../assets/intel_xeon_logo.png";
3-
import CPU_DATA, { CPUEntry, CPUs} from "../assets/data.ts";
3+
import CPU_DATA, { CPUEntry } from "../assets/data.ts";
44
import { useBenchmarkContext } from "../utility/BenchmarkContext.tsx";
55
import UP_ARROW from "../assets/up_arrow.svg";
66
import logo2013 from "../assets/intel_logo/2013.svg";

frontend/src/utility/BenchmarkContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CPU_LIST } from '../partials/Compare';
44
import { System } from './lifecycle_analysis/system';
55
import { generateSystemsComparison, ComparisonType } from './lifecycle_analysis/comparison';
66
import { GUPTA_MODEL } from './lifecycle_analysis/constants';
7-
import CPU_DATA, { CPUEntry, CPUs } from '../assets/data';
7+
import CPU_DATA from '../assets/data';
88

99
// Assumptions
1010
const timeHorizon = 20;

0 commit comments

Comments
 (0)