File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,20 @@ public static GoalEntryData CalcUserGoal(string groupUUID, Goal goalData)
101101 return ret ;
102102 }
103103
104+ public static bool checkPaused ( GoalGroup gg , Goal g )
105+ {
106+ if ( g . Dependency != "" )
107+ {
108+ int index = gg . Goals . FindIndex ( x => x . UUID == g . Dependency ) ;
109+ if ( index < 0 ) return true ; // Has invalid Dependency = Dont show
110+
111+ Goal nextG = gg . Goals [ index ] ;
112+ return checkPaused ( gg , nextG ) ;
113+ }
114+
115+ return g . Paused ;
116+ }
117+
104118 public static ( List < LineSeries > , List < TextAnnotation > ) CalcGraphGoals ( string sUUID )
105119 {
106120 List < LineSeries > lsret = new ( ) ;
@@ -119,6 +133,7 @@ public static (List<LineSeries>, List<TextAnnotation>) CalcGraphGoals(string sUU
119133 int val = totalCollected - ge . Collected + ge . Total ;
120134
121135 if ( val <= 0 ) continue ;
136+ if ( checkPaused ( gg , g ) ) continue ;
122137
123138 ls . Points . Add ( new DataPoint ( 0 , val ) ) ;
124139 ls . Points . Add ( new DataPoint ( TrackingDataHelper . GetDuration ( sUUID ) , val ) ) ;
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public static RectangleAnnotation CalcBufferZone(string sUUID, bool epilogue)
100100 ret . MinimumX = duration - bufferDays ;
101101 ret . MaximumX = duration ;
102102 ret . MinimumY = 0 ;
103- ret . MaximumY = total ;
103+ ret . MaximumY = total * 3 ;
104104
105105 ret . Fill = OxyColor . FromAColor ( 64 , OxyColors . Red ) ;
106106 return ret ;
You can’t perform that action at this time.
0 commit comments