Skip to content

Commit 68108dc

Browse files
committed
[VEX-106]: Removed points from Graphs in SeasonPopup
Only in current season are the points shown
1 parent ae8dbec commit 68108dc

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

VexTrack/MVVM/ViewModel/Popups/SeasonPopupViewModel.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ private void UpdateGraph(bool epilogue)
106106

107107
LineSeries ideal = GraphCalc.CalcIdealGraph(UUID, epilogue);
108108
LineSeries performance = GraphCalc.CalcPerformanceGraph(UUID);
109-
110-
LineSeries idealPoint = DashboardDataCalc.CalcGraphPoint(ideal, OxyColor.FromArgb(GraphIdealPoint.Color.A, GraphIdealPoint.Color.R, GraphIdealPoint.Color.G, GraphIdealPoint.Color.B));
111-
LineSeries performancePoint = DashboardDataCalc.CalcGraphPoint(performance, OxyColors.Maroon);
112-
109+
113110
RectangleAnnotation bufferZone = GraphCalc.CalcBufferZone(UUID, epilogue);
114111

115112
Graph.LegendPosition = LegendPosition.LeftTop;
@@ -126,8 +123,15 @@ private void UpdateGraph(bool epilogue)
126123
Graph.Series.Add(ideal);
127124
Graph.Series.Add(performance);
128125

129-
Graph.Series.Add(idealPoint);
130-
Graph.Series.Add(performancePoint);
126+
// Only add points to current season
127+
if (UUID == TrackingDataHelper.CurrentSeasonUUID)
128+
{
129+
LineSeries idealPoint = DashboardDataCalc.CalcGraphPoint(ideal, OxyColor.FromArgb(GraphIdealPoint.Color.A, GraphIdealPoint.Color.R, GraphIdealPoint.Color.G, GraphIdealPoint.Color.B));
130+
LineSeries performancePoint = DashboardDataCalc.CalcGraphPoint(performance, OxyColors.Maroon);
131+
132+
Graph.Series.Add(idealPoint);
133+
Graph.Series.Add(performancePoint);
134+
}
131135

132136
Graph.Annotations.Add(bufferZone);
133137

0 commit comments

Comments
 (0)