Skip to content

Commit

Permalink
Merge pull request #1652 from beto-rodriguez/fix-1162
Browse files Browse the repository at this point in the history
Fix 1162
  • Loading branch information
beto-rodriguez authored Oct 16, 2024
2 parents 7383eb1 + a2b76a0 commit 20cf604
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/LiveChartsCore/CoreLineSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ protected internal IEnumerable<BezierData> GetSpline(
{
var c = item.Current.Coordinate;

var sc = (c.PrimaryValue > 0
var sc = (c.PrimaryValue >= 0
? stacker?.GetStack(item.Current).Start
: stacker?.GetStack(item.Current).NegativeStart) ?? 0;

Expand Down Expand Up @@ -600,16 +600,18 @@ protected internal IEnumerable<BezierData> GetSpline(

if (stacker is not null)
{
pys = previous.PrimaryValue > 0
var isPositive = current.PrimaryValue >= 0;

pys = isPositive
? stacker.GetStack(item.Previous).Start
: stacker.GetStack(item.Previous).NegativeStart;
cys = current.PrimaryValue > 0
cys = isPositive
? stacker.GetStack(item.Current).Start
: stacker.GetStack(item.Current).NegativeStart;
nys = next.PrimaryValue > 0
nys = isPositive
? stacker.GetStack(item.Next).Start
: stacker.GetStack(item.Next).NegativeStart;
nnys = afterNext.PrimaryValue > 0
nnys = isPositive
? stacker.GetStack(item.AfterNext).Start
: stacker.GetStack(item.AfterNext).NegativeStart;
}
Expand Down

0 comments on commit 20cf604

Please sign in to comment.