From 66643ab3763b3d5e7868b029be8bef10569291a0 Mon Sep 17 00:00:00 2001 From: Sergio Date: Fri, 12 Jan 2024 16:56:53 -0300 Subject: [PATCH] SCHED-573: Fix building in CI --- src/components/ControlPanel/ControlPanel.tsx | 2 +- src/components/SchedulerPlot/SchedulerPlot.tsx | 8 ++++---- src/components/Validation/Validation.tsx | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/ControlPanel/ControlPanel.tsx b/src/components/ControlPanel/ControlPanel.tsx index c564508..c0b9d18 100644 --- a/src/components/ControlPanel/ControlPanel.tsx +++ b/src/components/ControlPanel/ControlPanel.tsx @@ -57,7 +57,7 @@ export default function ControlPanel() { sites: siteState, numNightsToSchedule: 3, mode: 'VALIDATION', - thesis: thesis, + thesisFactor: thesis, power: power, metPower: metPower, visPower: visPower, diff --git a/src/components/SchedulerPlot/SchedulerPlot.tsx b/src/components/SchedulerPlot/SchedulerPlot.tsx index a4dfee6..7320b2e 100644 --- a/src/components/SchedulerPlot/SchedulerPlot.tsx +++ b/src/components/SchedulerPlot/SchedulerPlot.tsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect, useRef } from 'react'; import Highcharts, { SeriesArearangeOptions } from 'highcharts'; -import HighchartsReact from 'highcharts-react-official'; +import HighchartsReact, { HighchartsReactRefObject } from 'highcharts-react-official'; import HighchartMore from 'highcharts/highcharts-more'; HighchartMore(Highcharts) @@ -28,7 +28,7 @@ const AltAzPlot: React.FC = ({ data }) => { const gridLineColor = theme === 'light' ? '#e6e6e6' : '#444'; // ref for post-render use - const chartRef = useRef(null); + const chartRef = useRef(null); // Array of colors from Highcharts const colorsOption = Highcharts.getOptions().colors; @@ -108,8 +108,8 @@ const AltAzPlot: React.FC = ({ data }) => { const x = (d.startDate.getTime() + d.endDate.getTime()) / 2; const y = Math.max(...d.yPoints) / 2; - const xPos = chart.xAxis[0].toPixels(x); - const yPos = chart.yAxis[0].toPixels(y); + const xPos = chart.xAxis[0].toPixels(x, false); + const yPos = chart.yAxis[0].toPixels(y, false); chart.renderer.text(d.label, xPos, yPos) .attr({ diff --git a/src/components/Validation/Validation.tsx b/src/components/Validation/Validation.tsx index 9432b9d..e0a6264 100644 --- a/src/components/Validation/Validation.tsx +++ b/src/components/Validation/Validation.tsx @@ -9,10 +9,11 @@ import "./Validation.scss" // For testing import SummaryTable from "../SummaryTable/SummaryTable" +import RankerTweaker from "../RankerTweaker/RankerTweaker" import { Panel } from "primereact/panel" import Results from "../Results/Results" -import RankerTweaker from "../RankerTweaker/rankerTweaker" + export default function Validation() {