Skip to content

Fix ternary coordinate validation in TriangularAxis#4798

Merged
swharden merged 11 commits intoScottPlot:mainfrom
manaruto:main
Feb 16, 2025
Merged

Fix ternary coordinate validation in TriangularAxis#4798
swharden merged 11 commits intoScottPlot:mainfrom
manaruto:main

Conversation

@manaruto
Copy link
Contributor

This PR fixes an issue with the GetCoordinates method in TriangularAxis. The original method incorrectly enforced leftFraction + rightFraction = 1, which violates ternary plot rules.

  • Ensures that bottomFraction + leftFraction + rightFraction = 1 as required for valid ternary plots.
  • Supports both clockwise and counterclockwise transformations.

#4797

This PR fixes an issue with the `GetCoordinates` method in `TriangularAxis`. The original method incorrectly enforced `leftFraction + rightFraction = 1`, which violates ternary plot rules.
Fixed whitespace formatting in TriangularAxis.cs
@manaruto
Copy link
Contributor Author

manaruto commented Feb 16, 2025

The dotnet format check is failing on all PRs, including ones I haven't touched.
It seems like a whitespace formatting issue was introduced in SmithChartAxis.cs.

Can someone verify if the main branch is properly formatted?

I i tried to fix that file but with no success.

@swharden
Copy link
Member

Hi @manaruto, thanks for this PR!

Can someone verify if the main branch is properly formatted?

I'll take a look now...

@swharden
Copy link
Member

There's some weirdness about the line endings not getting corrected on git changes in the autoformatter workflow... I'll ignore it for now, merge this, and ensure it's working in subsequent PRs. Sorry for the extra noise 😅

This is a great improvement - thanks for this PR! It will be in the next release 🚀

@swharden swharden merged commit 9353a1c into ScottPlot:main Feb 16, 2025
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

Incorrect Ternary Coordinate Validation in TriangularAxis.GetCoordinates

2 participants