Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/renderer/types/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface BaseCoordinates {
export interface Coordinates extends BaseCoordinates {
name: string;
shape: number[] | 'irregular';
coordinates: string[];
coord_dependencies: string[];
data: AxisData;
unit?: string;
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/renderer/utils/matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const getArrayValueFromDependance = (
const wantedCoordinate: Coordinates = coordinates.find(
(coord) => coord.axeIndex === axeIndexWanted,
);
if (!wantedCoordinate.coordinates.length) {
if (!wantedCoordinate.coord_dependencies.length) {
// get first array value when having no dependance
return getFirstArrayValueFromShape(
wantedCoordinate.data,
Expand All @@ -43,7 +43,7 @@ export const getArrayValueFromDependance = (
}

// get sorted valueIndex list (sorted by shape length) to access to data matrix
const dependances = wantedCoordinate.coordinates;
const dependances = JSON.parse(JSON.stringify(wantedCoordinate.coord_dependencies)).reverse();
const sortedIndexValueDependances: number[] = [];
for (const dependance of dependances) {
const coordDep = coordinates.find(
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/renderer/utils/plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ export function formatConfigBeforeLoadingURIs(
...coord,
name: '',
shape: [],
coordinates: [],
coord_dependencies: [],
data: [],
};
})
Expand Down Expand Up @@ -788,7 +788,7 @@ function formatCoordinates(
name: coordinate.name,
shape: coordinate.shape,
downsampled_shape: coordinate.downsampled_shape,
coordinates: coordinate.coordinates,
coord_dependencies: coordinate.coordinates,
data: coordinate.value,
valueIndex: valueIndex,
path:
Expand Down Expand Up @@ -888,7 +888,7 @@ export async function plotNodeUriLoaded(
matchingCoord.path = getDefaultUri(responseCoordinates.path);
matchingCoord.unit = responseCoordinates.unit || '';
matchingCoord.shape = responseCoordinates.downsampled_shape;
matchingCoord.coordinates = responseCoordinates.coordinates;
matchingCoord.coord_dependencies = responseCoordinates.coordinates;

//* Update the target - yPath - axis data with the index
matchingCoord.target = updateIndexFieldName(
Expand Down Expand Up @@ -1887,7 +1887,7 @@ export async function applyRangeInCoord(
}

const dependencyIndex = (
JSON.parse(JSON.stringify(coordDependencie.coordinates)) as string[]
JSON.parse(JSON.stringify(coordDependencie.coord_dependencies)) as string[]
)
.reverse() // We reverse dependencies to get dependency index in the order of the matrix
.findIndex((dep) => dep === coordinate.name);
Expand Down
Loading