@osrd-project/ui-charts 0.0.74 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -19
- package/dist/index.esm.js +744 -413
- package/dist/index.esm.js.map +1 -1
- package/dist/manchette/components/Manchette.d.ts +4 -3
- package/dist/manchette/components/Waypoint.d.ts +6 -4
- package/dist/manchette/hooks/useManchetteWithSpaceTimeChart.d.ts +13 -3
- package/dist/manchette/index.d.ts +5 -4
- package/dist/manchette/types.d.ts +0 -5
- package/dist/manchette/utils/helpers.d.ts +1 -5
- package/dist/manchette/utils/index.d.ts +3 -2
- package/dist/spaceTimeChart/index.d.ts +1 -0
- package/dist/spaceTimeChart/lib/types.d.ts +4 -6
- package/dist/spaceTimeChart/utils/__tests__/scales.spec.d.ts +1 -0
- package/dist/spaceTimeChart/utils/scales.d.ts +29 -0
- package/dist/speedSpaceChart/components/common/InteractionButtons.d.ts +2 -1
- package/dist/speedSpaceChart/components/common/SettingsPanel.d.ts +2 -1
- package/dist/speedSpaceChart/components/hooks.d.ts +1 -1
- package/dist/theme.css +1683 -2656
- package/dist/theme.css.map +1 -1
- package/dist/trackOccupancyDiagram/components/TrackOccupancyCanvas.d.ts +10 -2
- package/dist/trackOccupancyDiagram/components/TrackOccupancyManchette.d.ts +5 -3
- package/dist/trackOccupancyDiagram/components/TrackOccupancyStandalone.d.ts +10 -0
- package/dist/trackOccupancyDiagram/components/consts.d.ts +3 -1
- package/dist/trackOccupancyDiagram/components/helpers/drawElements/drawOccupancyZones.d.ts +13 -14
- package/dist/trackOccupancyDiagram/components/helpers/drawElements/drawOccupancyZonesTexts.d.ts +2 -2
- package/dist/trackOccupancyDiagram/components/helpers/drawElements/drawTracks.d.ts +7 -15
- package/dist/trackOccupancyDiagram/components/layers/OccupancyZonesLayer.d.ts +9 -9
- package/dist/trackOccupancyDiagram/components/layers/TracksLayer.d.ts +6 -3
- package/dist/trackOccupancyDiagram/components/types.d.ts +14 -22
- package/dist/trackOccupancyDiagram/index.d.ts +4 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -3,43 +3,48 @@
|
|
|
3
3
|
`ui-charts` is a library of charts and diagrams, designed by the project OSRD.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
|
+
|
|
6
7
|
To install the `ui-charts` package, run the following command in your project directory:
|
|
8
|
+
|
|
7
9
|
```sh
|
|
8
10
|
npm install @osrd-project/ui-charts
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
12
13
|
## Space Time Chart
|
|
14
|
+
|
|
13
15
|
The `SpaceTimeChart` is a React component designed to visualize train paths on a spacetime chart,
|
|
14
|
-
where the default horizontal axis (Ox) represents time and the default vertical axis (Oy) represents
|
|
15
|
-
(axis can be swapped).
|
|
16
|
+
where the default horizontal axis (Ox) represents time and the default vertical axis (Oy) represents
|
|
17
|
+
space (axis can be swapped).
|
|
16
18
|
|
|
17
19
|
Paths, graduations and labels are rendered on **canvas elements**. For interaction detection, shapes
|
|
18
20
|
are rendered on a separate layer with unique colors using a technique known as **"picking"**.
|
|
19
21
|
|
|
20
|
-
`SpaceTimeChart` is solely responsible for rendering and does not manage any state internally.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
You can have a look at its stories [here](https://openrailassociation.github.io/osrd-ui/?path=/story/spacetimechart-rendering--default-args)
|
|
25
|
-
or [here](https://openrailassociation.github.io/osrd-ui/?path=/story/manchette-with-spacetimechart-rendering--waypoint-menu) with its manchette.
|
|
22
|
+
`SpaceTimeChart` is solely responsible for rendering and does not manage any state internally. All
|
|
23
|
+
state management, including paths, offsets, scales, and zoom levels, must be handled by the parent
|
|
24
|
+
component.
|
|
26
25
|
|
|
26
|
+
You can have a look at its stories
|
|
27
|
+
[here](https://ui.osrd.fr/?path=/story/spacetimechart-rendering--default-args)
|
|
28
|
+
or
|
|
29
|
+
[here](https://ui.osrd.fr/?path=/story/manchette-with-spacetimechart-rendering--waypoint-menu)
|
|
30
|
+
with its manchette.
|
|
27
31
|
|
|
28
32
|
## Speed Space Chart
|
|
29
|
-
The `SpeedSpaceChart` is a React component designed to visualize the speed profile of a train along
|
|
30
|
-
a path.
|
|
31
|
-
It also allow to visualize some data along the path, such as the electrical profiles, the max speed profile,
|
|
32
|
-
the power restrictions, etc.
|
|
33
|
-
|
|
34
|
-
You can have a look at its stories [here](https://openrailassociation.github.io/osrd-ui/?path=/story/trackoccupancydiagram-rendering--track-occupancy-diagram-story-default).
|
|
35
33
|
|
|
34
|
+
The `SpeedSpaceChart` is a React component designed to visualize the speed profile of a train along
|
|
35
|
+
a path. It also allow to visualize some data along the path, such as the electrical profiles, the
|
|
36
|
+
max speed profile, the power restrictions, etc.
|
|
36
37
|
|
|
38
|
+
You can have a look at its stories
|
|
39
|
+
[here](https://ui.osrd.fr/?path=/story/trackoccupancydiagram-rendering--track-occupancy-diagram-story-default).
|
|
37
40
|
|
|
38
41
|
## Track Occupancy Diagram
|
|
39
|
-
The `TrackOccupancyDiagram` is a React component designed to visualize the track occupancy in station.
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
The `TrackOccupancyDiagram` is a React component designed to visualize the track occupancy in
|
|
44
|
+
station.
|
|
42
45
|
|
|
46
|
+
You can have a look at its story
|
|
47
|
+
[here](https://ui.osrd.fr/?path=/story/trackoccupancydiagram-rendering--track-occupancy-diagram-story-default).
|
|
43
48
|
|
|
44
49
|
## Resources
|
|
45
50
|
|
|
@@ -50,13 +55,11 @@ There are multiple places to get information on how to do things with `ui-charts
|
|
|
50
55
|
- **Unit Tests**: Refer to `src/__tests__` for practical demonstrations of helper functions from the
|
|
51
56
|
`src/utils` folder.
|
|
52
57
|
|
|
53
|
-
|
|
54
58
|
## Contributing
|
|
55
59
|
|
|
56
60
|
Contributions are welcome! Please refer to the repository's main README.md and CODE_OF_CONDUCT.md
|
|
57
61
|
for more details on how to contribute.
|
|
58
62
|
|
|
59
|
-
|
|
60
63
|
## License
|
|
61
64
|
|
|
62
65
|
This project is licensed under the GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - see
|