Skip to content

Commit

Permalink
Adjustments after merging in main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Sep 11, 2023
1 parent cacc651 commit 91b6a58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
16 changes: 6 additions & 10 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"devDependencies": {
"@babel/eslint-parser": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@types/culori": "^2.0.0",
"@types/jest": "^29.4.0",
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/modules/SimulationTimeSeriesModified/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const view = ({ moduleContext, workbenchSession, workbenchServices }: Mod

const handleHover = (e: PlotHoverEvent) => {
if (e.xvals.length > 0 && typeof e.xvals[0]) {
workbenchServices.publishGlobalData("global.hoverTimestamp", { timestamp: e.xvals[0] as number });
workbenchServices.publishGlobalData("global.hoverTimestamp", { timestampUtcMs: e.xvals[0] as number });
}
const curveData = e.points[0].data as MyPlotData;
if (typeof curveData.realizationNumber === "number") {
Expand All @@ -119,7 +119,7 @@ export const view = ({ moduleContext, workbenchSession, workbenchServices }: Mod

function handleUnHover() {
workbenchServices.publishGlobalData("global.hoverRealization", { realization: -1 });
workbenchServices.publishGlobalData("global.hoverTimestamp", { timestamp: -1 });
workbenchServices.publishGlobalData("global.hoverTimestamp", { timestampUtcMs: -1 });
}

let hoveredCurveNumber: number | null = null;
Expand All @@ -134,7 +134,7 @@ export const view = ({ moduleContext, workbenchSession, workbenchServices }: Mod
const lineWidth = 1;
const lineShape = vec.is_rate ? "vh" : "linear";
const trace: MyPlotData = {
x: vec.timestamps,
x: vec.timestamps_utc_ms,
y: vec.values,
name: `real-${vec.realization}`,
realizationNumber: vec.realization,
Expand All @@ -151,7 +151,7 @@ export const view = ({ moduleContext, workbenchSession, workbenchServices }: Mod
const lineShape = statisticsQuery.data.is_rate ? "vh" : "linear";
for (const statValueObj of statisticsQuery.data.value_objects) {
const trace: MyPlotData = {
x: statisticsQuery.data.timestamps,
x: statisticsQuery.data.timestamps_utc_ms,
y: statValueObj.values,
name: statValueObj.statistic_function,
legendrank: -1,
Expand All @@ -166,7 +166,7 @@ export const view = ({ moduleContext, workbenchSession, workbenchServices }: Mod
if (showHistorical && historicalQuery.data) {
const lineShape = historicalQuery.data.is_rate ? "vh" : "linear";
const trace: MyPlotData = {
x: historicalQuery.data.timestamps,
x: historicalQuery.data.timestamps_utc_ms,
y: historicalQuery.data.values,
name: "History",
legendrank: -1,
Expand Down

0 comments on commit 91b6a58

Please sign in to comment.