Skip to content
Open
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
22 changes: 21 additions & 1 deletion front/src/modules/simulationResult/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Dispatch, SetStateAction } from 'react';

import type { LayerData, PowerRestrictionValues } from '@osrd-project/ui-charts';
import type { LayerData, PathLevel, PowerRestrictionValues } from '@osrd-project/ui-charts';

import type {
PathProjectionResult,
Expand Down Expand Up @@ -126,3 +126,23 @@ export type DraggingState = {
draggedTrain: IndividualTrainProjection;
initialDepartureTime: Date;
};

/**
* Visual style of a curve, computed by the shared curve-style helper
* and used by STD (PathLayer) and TOD (OccupancyBlockLayer).
*/
export type CurveStyle = {
color: string;
opacity: number;
level?: PathLevel;
border?: {
offset: number;
color: string;
width?: number;
backgroundColor?: string;
};
label?: {
border?: { color: string; width: number };
fontWeight?: number;
};
Comment on lines +144 to +147
Copy link
Copy Markdown
Contributor

@Akctarus Akctarus May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After working on it, I found out that we better may need something like that for labels:

Suggested change
label?: {
border?: { color: string; width: number };
fontWeight?: number;
};
label?: {
fontWeight?: number;
background?: string;
borderRadius?: number;
};

see in #16752 , but it can be discussed

};
Loading