Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a comparator to sort nodes in NAD and SLD #623

Closed
antoinebhs opened this issue Jun 19, 2024 · 1 comment
Closed

Add a comparator to sort nodes in NAD and SLD #623

antoinebhs opened this issue Jun 19, 2024 · 1 comment
Assignees

Comments

@antoinebhs
Copy link

antoinebhs commented Jun 19, 2024

Describe the current behavior

Currently, bus nodes within each voltage level are sorted differently between the NAD and SLD implementations. In addition, there is no easy way to override the default sorting behavior.

Describe the expected behavior

We need to extract and expose a comparator in both the NAD and SLD StyleProviders. This will allow us to sort bus nodes consistently across different voltage levels in both systems. The primary goal is to ensure that nodes are sorted consistently, which in turn will allow for consistent coloring of the same nodes between SLD and NAD.

Describe the motivation

In GridSuite, we set the same colors for bus nodes in voltage levels for NAD and SLD so that users can have corresponding node colors in both diagrams. For example, for voltage levels between 300kV and 500kV, the first node color is:

.nad-vl300to500-0 {--nad-vl-color: #ff0000}
.sld-vl300to500-0 {--sld-vl-color: #ff0000}

In some cases, because bus nodes are not sorted in the same way between NAD and SLD, the node colors are not consistent between the two diagrams which is confusing to users.

Extra Information

No response

@EstherDarkish
Copy link
Contributor

The selected solution opts out of a comparator and instead uses the provided order of buses to draw the classes in the NAD, like it is done with the SLDs.

@flo-dup flo-dup closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants