public IEnumerable <GraphSerie> GetSeries() { var series = new List <GraphSerie>(); if (showDownDataPoints == null || nonShowDownDataPoints == null) { return(series); } var showDownSerie = new GraphSerie { DataPoints = new ObservableCollection <GraphSerieDataPoint>(showDownDataPoints.Values), Legend = "Showdown" }; var nonShowDownSerie = new GraphSerie { DataPoints = new ObservableCollection <GraphSerieDataPoint>(nonShowDownDataPoints.Values), Legend = "Non showdown" }; series.Add(showDownSerie); series.Add(nonShowDownSerie); return(series); }
public IEnumerable <GraphSerie> GetSeries() { var series = new List <GraphSerie>(); if (evDiffDataPoints == null || evDataPoints == null) { return(series); } evDiffDataPoints.Values.ForEach(x => x.Value = Math.Round(x.Value, 2)); var showDownSerie = new GraphSerie { DataPoints = new ObservableCollection <GraphSerieDataPoint>(evDiffDataPoints.Values), Legend = "EV Diff" }; var nonShowDownSerie = new GraphSerie { DataPoints = new ObservableCollection <GraphSerieDataPoint>(evDataPoints.Values), Legend = "Money won" }; series.Add(showDownSerie); series.Add(nonShowDownSerie); return(series); }
public GraphGlobal(StatTypeStruct myStatTypeStruct, int personID, string personName) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 1; //for Simplesession this.personID = personID; this.personName = personName; //this.heightPreferred = heightPreferred; if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = ""; } if(sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieTv = new GraphSerie(); serieIndex.Title = translateYesNo("Value"); if(heightPreferred) { serieTv.Title = translateYesNo("Height"); } else { serieTv.Title = translateYesNo("TF"); } serieIndex.IsLeftAxis = false; serieTv.IsLeftAxis = true; if(heightPreferred) { CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)"; } else { CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)"; } CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } if(heightPreferred) { CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)"; } else { CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)"; } //CurrentGraphData.LabelRight = ""; CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)"; } }
public GraphSjCmjAbkPlus(StatTypeStruct myStatTypeStruct) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = "Simple jumps"; } if(sessions.Count == 1) { //four series, the four columns serieTv = new GraphSerie(); serieHeight = new GraphSerie(); serieWeight = new GraphSerie(); string weightName = Catalog.GetString("Weight"); if(weightPercentPreferred) weightName += " %"; else weightName += " Kg"; serieTv.Title = Catalog.GetString("TF"); serieHeight.Title = Catalog.GetString("Height"); serieWeight.Title = weightName; serieTv.IsLeftAxis = true; serieHeight.IsLeftAxis = false; serieWeight.IsLeftAxis = false; CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)"; CurrentGraphData.LabelRight = Catalog.GetString("Height") + "(cm), " + Catalog.GetString("Weight") + "(Kg)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } if(heightPreferred) { CurrentGraphData.LabelLeft = Catalog.GetString("Height") + "(cm)"; } else { CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)"; } CurrentGraphData.LabelRight = ""; } }
public GraphDjQ(StatTypeStruct myStatTypeStruct) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 5; //for Simplesession (index, height, tv, tc, fall) if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = Constants.QIndexFormula; } if(sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieHeight = new GraphSerie(); serieTc = new GraphSerie(); serieTv = new GraphSerie(); serieFall = new GraphSerie(); serieIndex.Title = translateYesNo("Q Index"); serieHeight.Title = translateYesNo("Height"); serieTc.Title = translateYesNo("TC"); serieTv.Title = translateYesNo("TF"); serieFall.Title = translateYesNo("Fall"); serieIndex.IsLeftAxis = true; serieHeight.IsLeftAxis = false; serieTc.IsLeftAxis = true; serieTv.IsLeftAxis = true; serieFall.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("TC") + "(s), " + translateYesNo("TF") + "(s)"; CurrentGraphData.LabelRight = translateYesNo("Index") + "(%), " + translateYesNo("Height") + "(cm), " + translateYesNo("Fall") + "(cm)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = ""; } }
public GraphPotency(StatTypeStruct myStatTypeStruct, string indexType) { this.indexType = indexType; completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 4; //for Simplesession (index, personWeight, extraWeight, height) /* if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } */ this.operation = ""; CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = translateYesNo("Peak Power"); } if(sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); seriePersonWeight = new GraphSerie(); serieExtraWeight = new GraphSerie(); serieHeight = new GraphSerie(); serieIndex.Title = translateYesNo("Peak Power"); seriePersonWeight.Title = translateYesNo("Person's Weight"); serieExtraWeight.Title = translateYesNo("Extra Weight") + " (Kg)"; serieHeight.Title = translateYesNo("Height"); serieIndex.IsLeftAxis = true; seriePersonWeight.IsLeftAxis = false; serieExtraWeight.IsLeftAxis = false; serieHeight.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Peak Power") + "(" + translateYesNo("watts") + ")"; CurrentGraphData.LabelRight = translateYesNo("Weight") + "(kg), " + translateYesNo("Height") + "(cm)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Peak Power") + "(" + translateYesNo("watts") + ")"; CurrentGraphData.LabelRight = ""; } }
public GraphRunSimple(StatTypeStruct myStatTypeStruct) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { CurrentGraphData.GraphTitle = "Simple races"; } if (sessions.Count == 1) { //four series, the four columns serieSpeed = new GraphSerie(); serieDistance = new GraphSerie(); serieTime = new GraphSerie(); serieSpeed.Title = translateYesNo("Speed"); serieDistance.Title = translateYesNo("Distance"); serieTime.Title = translateYesNo("Time");; serieSpeed.IsLeftAxis = true; serieDistance.IsLeftAxis = false; serieTime.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(m/s)"; CurrentGraphData.LabelRight = translateYesNo("Distance") + "(m), " + translateYesNo("Time") + "(s)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(s)"; CurrentGraphData.LabelRight = ""; } }
public GraphFv(StatTypeStruct myStatTypeStruct, string indexType) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession (index, jump1, jump2) //this.jumpType = jumpType; //this.limit = limit; jump1="SJl"; jump2="SJ"; //completeConstruction (treeview, sessions, newPrefsDigitsNumber, showSex, statsJumpsType); if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = Constants.FvIndexFormula; } if(sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieJump1 = new GraphSerie(); serieJump2 = new GraphSerie(); serieIndex.Title = indexType; serieJump1.Title = jump1 + " (" + translateYesNo("height") + ")"; serieJump2.Title = jump2 + " (" + translateYesNo("height") + ")"; serieIndex.IsLeftAxis = false; serieJump1.IsLeftAxis = true; serieJump2.IsLeftAxis = true; //this index is measured in height of CdG (not in tv) CurrentGraphData.LabelLeft = jump1 + " " + translateYesNo("Height") + "(cm), " + jump2 + " " + translateYesNo("Height") + "(cm)"; CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = ""; } }
public GraphJumpSimpleSubtraction(StatTypeStruct myStatTypeStruct) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 4; //for Simplesession (resultPercent, result, test1, test2) string [] applyTos = myStatTypeStruct.StatisticApplyTo.Split(new char[] {','}); test1 = applyTos[0]; test2 = applyTos[1]; columnsString[0] = translateYesNo("Jumper"); columnsString[1] = translateYesNo("ResultPercent"); columnsString[2] = test1; columnsString[3] = test2; if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) CurrentGraphData.GraphTitle = ""; else CurrentGraphData.GraphTitle = string.Format(Catalog.GetString("Subtraction between {0} {1} and {0} {2}"), operation, test1, test2); if(sessions.Count == 1) { //four series, the four columns serieResultPercent = new GraphSerie(); serieJump1 = new GraphSerie(); serieJump2 = new GraphSerie(); serieResultPercent.Title = translateYesNo("Result") + " %"; serieJump1.Title = test1; serieJump2.Title = test2; serieResultPercent.IsLeftAxis = true; serieJump1.IsLeftAxis = false; serieJump2.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Result") + " %"; CurrentGraphData.LabelRight = test1 + " " + translateYesNo("TF") + "(s), " + test2 + " " + translateYesNo("TF") + "(s)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Result") + " %"; CurrentGraphData.LabelRight = ""; } }
public GraphRjAVGSD(StatTypeStruct myStatTypeStruct, string indexType) { this.indexType = indexType; completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession (avg, sd, jumps) //no average for this stat //if (statsJumpsType == 2) { this.operation = "MAX"; /* * } else { * this.operation = "AVG"; * } */ CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = indexType; } serieAVG = new GraphSerie(); serieSD = new GraphSerie(); serieJumps = new GraphSerie(); serieAVG.Title = translateYesNo("AVG"); serieSD.Title = translateYesNo("SD"); serieJumps.Title = translateYesNo("Jumps"); serieAVG.IsLeftAxis = true; serieSD.IsLeftAxis = true; serieJumps.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("AVG") + ", " + translateYesNo("SD"); CurrentGraphData.LabelRight = translateYesNo("Jumps"); CurrentGraphData.IsRightAxisInteger = true; }
public IEnumerable <GraphSerie> GetSeries() { var dataService = ServiceLocator.Current.GetInstance <IDataService>(); var tournaments = dataService.GetPlayerTournaments(StorageModel.PlayerSelectedItem.PlayerIds); var filterModelManagerService = ServiceLocator.Current.GetInstance <IFilterModelManagerService>(FilterServices.Main.ToString()); var dateFilter = filterModelManagerService.FilterModelCollection?.OfType <FilterDateModel>().FirstOrDefault(); var filteredTournaments = dateFilter != null?dateFilter.FilterTournaments(tournaments) : tournaments; var series = new List <GraphSerie>(); var dataPoints = new Dictionary <string, GraphSerieDataPoint>(); foreach (var tournament in filteredTournaments) { var gameType = (GameType)tournament.PokergametypeId; var tournamentType = $"{gameType} {tournament.Tourneytagscsv}"; if (!dataPoints.ContainsKey(tournamentType)) { var dataPoint = new GraphSerieDataPoint { Category = tournamentType, }; dataPoints.Add(tournamentType, dataPoint); var serie = new GraphSerie { DataPoints = new ObservableCollection <GraphSerieDataPoint> { dataPoint }, Legend = tournamentType }; series.Add(serie); } dataPoints[tournamentType].Value += (tournament.Winningsincents - tournament.Buyinincents - tournament.Rakeincents) / 100m; } return(series); }
public GraphRunSimple(StatTypeStruct myStatTypeStruct) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { CurrentGraphData.GraphTitle = "Simple races"; } if(sessions.Count == 1) { //four series, the four columns serieSpeed = new GraphSerie(); serieDistance = new GraphSerie(); serieTime = new GraphSerie(); serieSpeed.Title = translateYesNo("Speed"); serieDistance.Title = translateYesNo("Distance"); serieTime.Title = translateYesNo("Time");; serieSpeed.IsLeftAxis = true; serieDistance.IsLeftAxis = false; serieTime.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(m/s)"; CurrentGraphData.LabelRight = translateYesNo("Distance") + "(m), " + translateYesNo("Time") + "(s)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(s)"; CurrentGraphData.LabelRight = ""; } }
public GraphRjAVGSD(StatTypeStruct myStatTypeStruct, string indexType) { this.indexType = indexType; completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession (avg, sd, jumps) //no average for this stat //if (statsJumpsType == 2) { this.operation = "MAX"; /* } else { this.operation = "AVG"; } */ CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = indexType; } serieAVG = new GraphSerie(); serieSD = new GraphSerie(); serieJumps = new GraphSerie(); serieAVG.Title = Catalog.GetString("AVG"); serieSD.Title = Catalog.GetString("SD"); serieJumps.Title = Catalog.GetString("Jumps"); serieAVG.IsLeftAxis = true; serieSD.IsLeftAxis = true; serieJumps.IsLeftAxis = false; CurrentGraphData.LabelLeft = Catalog.GetString("AVG") + ", " + Catalog.GetString("SD"); CurrentGraphData.LabelRight = Catalog.GetString("Jumps"); CurrentGraphData.IsRightAxisInteger = true; }
protected override void printData(string [] statValues) { /* * if one day i found the way of plotting different (single plots) i will use it for the numContinuous */ /* * if(numContinuous != -1) { * int bestPos = findBestContinuous(statValues, numContinuous); * if(bestPos != -1) { * statValues = markBestContinuous(statValues, numContinuous, bestPos); * } * } */ GraphSerie serieTc = new GraphSerie(); GraphSerie serieTv = new GraphSerie(); serieTc.IsLeftAxis = true; serieTv.IsLeftAxis = true; int i = 0; foreach (string myValue in statValues) { if (i == 0) { serieTc.Title = myValue + " " + Catalog.GetString("TC"); serieTv.Title = myValue + " " + Catalog.GetString("TF"); } else if (isTC(i)) { serieTc.SerieData.Add(myValue); } else if (isTF(i)) { serieTv.SerieData.Add(myValue); } i++; } //add created series to GraphSeries ArrayList GraphSeries.Add(serieTc); GraphSeries.Add(serieTv); }
protected override void printData(string [] statValues) { /* * if one day i found the way of plotting different (single plots) i will use it for the numContinuous */ /* * if(numContinuous != -1) { * int bestPos = findBestContinuous(statValues, numContinuous); * if(bestPos != -1) { * statValues = markBestContinuous(statValues, numContinuous, bestPos); * } * } */ GraphSerie serieSpeed = new GraphSerie(); serieSpeed.IsLeftAxis = true; int i = 0; foreach (string myValue in statValues) { if (i == 0) { serieSpeed.Title = myValue; } else if (i >= 2) { serieSpeed.SerieData.Add(myValue); } //i==1 is the avg speed, is not used i++; } //add created series to GraphSeries ArrayList GraphSeries.Add(serieSpeed); }
public IEnumerable <GraphSerie> GetSeries() { var series = new List <GraphSerie>(); if (dataPoints == null) { return(series); } foreach (KeyValuePair <string, GraphSerieDataPoint> dataPoint in dataPoints) { var serie = new GraphSerie { DataPoints = new ObservableCollection <GraphSerieDataPoint> { dataPoint.Value }, Legend = dataPoint.Key }; series.Add(serie); } return(series); }
public GraphJumpSimpleSubtraction(StatTypeStruct myStatTypeStruct) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 4; //for Simplesession (resultPercent, result, test1, test2) string [] applyTos = myStatTypeStruct.StatisticApplyTo.Split(new char[] { ',' }); test1 = applyTos[0]; test2 = applyTos[1]; columnsString[0] = translateYesNo("Jumper"); columnsString[1] = translateYesNo("ResultPercent"); columnsString[2] = test1; columnsString[3] = test2; if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { CurrentGraphData.GraphTitle = string.Format(Catalog.GetString("Subtraction between {0} {1} and {0} {2}"), operation, test1, test2); } if (sessions.Count == 1) { //four series, the four columns serieResultPercent = new GraphSerie(); serieJump1 = new GraphSerie(); serieJump2 = new GraphSerie(); serieResultPercent.Title = translateYesNo("Result") + " %"; serieJump1.Title = test1; serieJump2.Title = test2; serieResultPercent.IsLeftAxis = true; serieJump1.IsLeftAxis = false; serieJump2.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Result") + " %"; CurrentGraphData.LabelRight = test1 + " " + translateYesNo("TF") + "(s), " + test2 + " " + translateYesNo("TF") + "(s)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Result") + " %"; CurrentGraphData.LabelRight = ""; } }
public GraphRjPotencyBosco(StatTypeStruct myStatTypeStruct) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 6; //for Simplesession (index, tv(avg), tc(avg), jumps, time, fall) if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = Constants.RJPotencyBoscoName; CurrentGraphData.GraphSubTitle = Constants.RJPotencyBoscoFormula; } if(sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieTc = new GraphSerie(); serieTv = new GraphSerie(); serieJumps = new GraphSerie(); serieTime = new GraphSerie(); serieFall = new GraphSerie(); serieIndex.Title = Catalog.GetString("Index"); serieTc.Title = Catalog.GetString("TC") + " (" + Catalog.GetString("AVG") + ")"; serieTv.Title = Catalog.GetString("TF") + " (" + Catalog.GetString("AVG") + ")"; //serieJumps.Title = Catalog.GetString("Jumps") + " *10"; //serieTime.Title = Catalog.GetString("Time") + " *10"; serieJumps.Title = Catalog.GetString("Jumps"); serieTime.Title = Catalog.GetString("Time"); serieFall.Title = Catalog.GetString("Fall"); serieIndex.IsLeftAxis = false; serieTc.IsLeftAxis = true; serieTv.IsLeftAxis = true; serieJumps.IsLeftAxis = false; serieTime.IsLeftAxis = false; serieFall.IsLeftAxis = false; CurrentGraphData.LabelLeft = Catalog.GetString("TC") + "(s), " + Catalog.GetString("TF") + "(s)"; CurrentGraphData.LabelRight = Catalog.GetString("Index") + "(%), " + Catalog.GetString("Jumps") + ", " + Catalog.GetString("Time") + "(s), " + Catalog.GetString("Fall") + "(cm)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)"; CurrentGraphData.LabelRight = ""; } }
protected override void printData(string [] statValues) { //values are recorded for calculating later AVG and SD recordStatValues(statValues); if (sessions.Count == 1) { int i = 0; bool foundAVG = false; //we need to save this transposed foreach (string myValue in statValues) { if (i == 0) { if (myValue == Catalog.GetString("AVG")) { foundAVG = true; } else { CurrentGraphData.XAxisNames.Add(myValue); } } else if (i == 1) { if (foundAVG) { serieResultPercent.Avg = Convert.ToDouble(myValue); } else { serieResultPercent.SerieData.Add(myValue); } //2 is result and is not plotted } else if (i == 3) { if (foundAVG) { serieJump1.Avg = Convert.ToDouble(myValue); } else { serieJump1.SerieData.Add(myValue); } } else if (i == 4) { if (foundAVG) { serieJump2.Avg = Convert.ToDouble(myValue); } else { serieJump2.SerieData.Add(myValue); } } if (foundAVG && i == dataColumns) { //add created series to GraphSeries ArrayList //check don't do it two times if (GraphSeries.Count == 0) { GraphSeries.Add(serieJump1); GraphSeries.Add(serieJump2); GraphSeries.Add(serieResultPercent); } return; } i++; } } else { GraphSerie mySerie = new GraphSerie(); mySerie.IsLeftAxis = true; int i = 0; foreach (string myValue in statValues) { if (myValue == Catalog.GetString("SD")) { return; } if (i == 0) { mySerie.Title = myValue; } else if (i == sessions.Count + 1) //eg, for 2 sessions: [(0)person name, (1)sess1, (2)sess2, (3)AVG] { if (myValue != "-") { mySerie.Avg = Convert.ToDouble(myValue); } } else { mySerie.SerieData.Add(myValue); } i++; } GraphSeries.Add(mySerie); } }
public GraphJumpIndexes(StatTypeStruct myStatTypeStruct, string indexType) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession (index, jump1, jump2) this.indexType = indexType; //"IE" or Constants.ArmsUseIndexName or "IR" if (indexType == "IE") { jump1 = "CMJ"; jump2 = "SJ"; } else if (indexType == Constants.ArmsUseIndexName) { jump1 = "ABK"; jump2 = "CMJ"; } else if (indexType == "IRna") //reactivity DJna { jump1 = "DJna"; jump2 = "CMJ"; } else //IRa //reactivity { jump1 = "DJa"; jump2 = "CMJ"; } columnsString[0] = "Jumper"; columnsString[1] = indexType; columnsString[2] = jump1; if (useHeightsOnJumpIndexes) { columnsString[2] = jump1 + " (" + translateYesNo("height") + ")"; } columnsString[3] = jump2; if (useHeightsOnJumpIndexes) { columnsString[3] = jump2 + " (" + translateYesNo("height") + ")"; } if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); if (indexType == "IE") { CurrentGraphData.GraphTitle = Constants.IeIndexFormula; } else if (indexType == Constants.ArmsUseIndexName) { CurrentGraphData.GraphTitle = Constants.ArmsUseIndexFormula; } else if (indexType == "IRna") { CurrentGraphData.GraphTitle = Constants.IRnaIndexFormula; } else // indexType == "IRa" { CurrentGraphData.GraphTitle = Constants.IRaIndexFormula; } } if (sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieJump1 = new GraphSerie(); serieJump2 = new GraphSerie(); serieIndex.Title = indexType; serieJump1.Title = jump1; serieJump2.Title = jump2; serieIndex.IsLeftAxis = true; serieJump1.IsLeftAxis = false; serieJump2.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = jump1 + " " + translateYesNo("TF") + "(s), " + jump2 + " " + translateYesNo("TF") + "(s)"; if (useHeightsOnJumpIndexes) { CurrentGraphData.LabelRight = jump1 + " " + translateYesNo("height") + "(m), " + jump2 + " " + translateYesNo("height") + "(m)"; } } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = ""; } }
public GraphSjCmjAbkPlus(StatTypeStruct myStatTypeStruct) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("Chronojump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = "Simple jumps"; } if (sessions.Count == 1) { //four series, the four columns serieTv = new GraphSerie(); serieHeight = new GraphSerie(); serieWeight = new GraphSerie(); string weightName = translateYesNo("Extra weight"); if (weightPercentPreferred) { weightName += " %"; } else { weightName += " Kg"; } serieTv.Title = translateYesNo("TF"); serieHeight.Title = translateYesNo("Height"); serieWeight.Title = weightName; serieTv.IsLeftAxis = true; serieHeight.IsLeftAxis = false; serieWeight.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)"; CurrentGraphData.LabelRight = translateYesNo("Height") + "(cm), " + translateYesNo("Weight") + "(Kg)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } if (heightPreferred) { CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)"; } else { CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)"; } CurrentGraphData.LabelRight = ""; } }
protected override void printData(string [] statValues) { if (sessions.Count == 1) { int i = 0; //we need to save this transposed string myValueBefore = ""; foreach (string myValue in statValues) { if (i == 0) { //don't plot AVG and SD rows if (myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD")) { return; } //global is nicer and cleaner without the AVG and SD if (GraphSeries.Count == 0) { GraphSeries.Add(serieTv); GraphSeries.Add(serieIndex); } /* * //don't plot AVG and SD rows * if( myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD") ) { * //good moment for adding created series to GraphSeries ArrayList * //check don't do it two times * if(GraphSeries.Count == 0) { * GraphSeries.Add(serieIndex); * GraphSeries.Add(serieTv); * } * return; * } */ if (myValue.StartsWith("IndexQ")) { CurrentGraphData.XAxisNames.Add(myValue.Replace("IndexQ", "IndexQ *10")); } else if (myValue == "FV") { CurrentGraphData.XAxisNames.Add(myValue.Replace("FV", "FV *10")); } else { CurrentGraphData.XAxisNames.Add(myValue); } //record the statistic (stripping of sex) string [] stringFullResults = myValue.Split(new char[] { '.' }); myValueBefore = stringFullResults[0]; } else { if (myValueBefore.StartsWith("DjIndex") || myValueBefore.StartsWith("RjIndex") || myValueBefore.StartsWith(Constants.RJPotencyBoscoName) || myValueBefore == "IE" || myValueBefore == Constants.ArmsUseIndexName) { serieIndex.SerieData.Add(myValue); //serieTv.SerieData.Add("-"); } else if (myValueBefore.StartsWith("IndexQ") || myValueBefore == "FV") { serieIndex.SerieData.Add(( Convert.ToDouble(myValue) * 10).ToString()); //serieTv.SerieData.Add("-"); } else { serieTv.SerieData.Add(myValue); //serieIndex.SerieData.Add("-"); } } i++; } } else { GraphSerie mySerie = new GraphSerie(); int i = 0; string myValueBefore = ""; foreach (string myValue in statValues) { if (myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD")) { return; } if (i == 0) { //strip of sex string [] stringFullResults = myValue.Split(new char[] { '.' }); string valueNoSex = stringFullResults[0]; if (valueNoSex.StartsWith("DjIndex") || valueNoSex.StartsWith("IndexQ") || valueNoSex.StartsWith("RjIndex") || valueNoSex.StartsWith(Constants.RJPotencyBoscoName) || valueNoSex == "IE" || valueNoSex == Constants.ArmsUseIndexName || valueNoSex == "FV") { mySerie.IsLeftAxis = false; } else { mySerie.IsLeftAxis = true; } myValueBefore = valueNoSex; //for changing later indexQ for indexQ*10 mySerie.Title = myValue; } else { if (myValueBefore.StartsWith("IndexQ")) { if (myValue == "-") { mySerie.SerieData.Add(myValue); } else { mySerie.SerieData.Add(( Convert.ToDouble(myValue) * 10).ToString()); } mySerie.Title = myValueBefore.Replace("IndexQ", "IndexQ *10"); } else if (myValueBefore == "FV") { if (myValue == "-") { mySerie.SerieData.Add(myValue); } else { mySerie.SerieData.Add(( Convert.ToDouble(myValue) * 10).ToString()); } mySerie.Title = myValueBefore.Replace("FV", "FV *10"); } else { mySerie.SerieData.Add(myValue); } } i++; } GraphSeries.Add(mySerie); } }
public GraphFv(StatTypeStruct myStatTypeStruct, string indexType) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession (index, jump1, jump2) //this.jumpType = jumpType; //this.limit = limit; jump1 = "SJl"; jump2 = "SJ"; //completeConstruction (treeview, sessions, newPrefsDigitsNumber, showSex, statsJumpsType); if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("Chronojump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = Constants.FvIndexFormula; } if (sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieJump1 = new GraphSerie(); serieJump2 = new GraphSerie(); serieIndex.Title = indexType; serieJump1.Title = jump1 + " (" + translateYesNo("height") + ")"; serieJump2.Title = jump2 + " (" + translateYesNo("height") + ")"; serieIndex.IsLeftAxis = false; serieJump1.IsLeftAxis = true; serieJump2.IsLeftAxis = true; //this index is measured in height of CdG (not in tv) CurrentGraphData.LabelLeft = jump1 + " " + translateYesNo("Height") + "(cm), " + jump2 + " " + translateYesNo("Height") + "(cm)"; CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = ""; } }
protected override void printData(string [] statValues) { /* * if one day i found the way of plotting different (single plots) i will use it for the numContinuous */ /* if(numContinuous != -1) { int bestPos = findBestContinuous(statValues, numContinuous); if(bestPos != -1) { statValues = markBestContinuous(statValues, numContinuous, bestPos); } } */ GraphSerie serieTc = new GraphSerie(); GraphSerie serieTv = new GraphSerie(); serieTc.IsLeftAxis = true; serieTv.IsLeftAxis = true; int i = 0; foreach (string myValue in statValues) { if(i==0) { serieTc.Title = myValue + " " + Catalog.GetString("TC"); serieTv.Title = myValue + " " + Catalog.GetString("TF"); } else if(isTC(i)) { serieTc.SerieData.Add(myValue); } else if(isTF(i)) { serieTv.SerieData.Add(myValue); } i++; } //add created series to GraphSeries ArrayList GraphSeries.Add(serieTc); GraphSeries.Add(serieTv); }
public GraphPotency(StatTypeStruct myStatTypeStruct, string indexType) { this.indexType = indexType; completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 4; //for Simplesession (index, personWeight, extraWeight, height) /* * if (statsJumpsType == 2) { * this.operation = "MAX"; * } else { * this.operation = "AVG"; * } */ this.operation = ""; CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = translateYesNo("Peak Power"); } if (sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); seriePersonWeight = new GraphSerie(); serieExtraWeight = new GraphSerie(); serieHeight = new GraphSerie(); serieIndex.Title = translateYesNo("Peak Power"); seriePersonWeight.Title = translateYesNo("Person's Weight"); serieExtraWeight.Title = translateYesNo("Extra Weight") + " (Kg)"; serieHeight.Title = translateYesNo("Height"); serieIndex.IsLeftAxis = true; seriePersonWeight.IsLeftAxis = false; serieExtraWeight.IsLeftAxis = false; serieHeight.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Peak Power") + "(" + translateYesNo("watts") + ")"; CurrentGraphData.LabelRight = translateYesNo("Weight") + "(kg), " + translateYesNo("Height") + "(cm)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Peak Power") + "(" + translateYesNo("watts") + ")"; CurrentGraphData.LabelRight = ""; } }
protected override void printData(string [] statValues) { if(sessions.Count == 1) { int i = 0; //we need to save this transposed string myValueBefore = ""; foreach (string myValue in statValues) { if(i == 0) { //don't plot AVG and SD rows if( myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD") ) { return; } //global is nicer and cleaner without the AVG and SD if(GraphSeries.Count == 0) { GraphSeries.Add(serieTv); GraphSeries.Add(serieIndex); } /* //don't plot AVG and SD rows if( myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD") ) { //good moment for adding created series to GraphSeries ArrayList //check don't do it two times if(GraphSeries.Count == 0) { GraphSeries.Add(serieIndex); GraphSeries.Add(serieTv); } return; } */ if(myValue.StartsWith("IndexQ")) { CurrentGraphData.XAxisNames.Add(myValue.Replace("IndexQ", "IndexQ *10")); } else if(myValue == "FV") { CurrentGraphData.XAxisNames.Add(myValue.Replace("FV", "FV *10")); } else { CurrentGraphData.XAxisNames.Add(myValue); } //record the statistic (stripping of sex) string [] stringFullResults = myValue.Split(new char[] {'.'}); myValueBefore = stringFullResults[0]; } else { if(myValueBefore.StartsWith("DjIndex") || myValueBefore.StartsWith("RjIndex") || myValueBefore.StartsWith(Constants.RJPotencyBoscoName) || myValueBefore == "IE" || myValueBefore == Constants.ArmsUseIndexName) { serieIndex.SerieData.Add(myValue); //serieTv.SerieData.Add("-"); } else if(myValueBefore.StartsWith("IndexQ") || myValueBefore == "FV") { serieIndex.SerieData.Add( ( Convert.ToDouble(myValue) *10).ToString() ); //serieTv.SerieData.Add("-"); } else { serieTv.SerieData.Add(myValue); //serieIndex.SerieData.Add("-"); } } i++; } } else { GraphSerie mySerie = new GraphSerie(); int i=0; string myValueBefore = ""; foreach (string myValue in statValues) { if( myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD") ) { return; } if(i == 0) { //strip of sex string [] stringFullResults = myValue.Split(new char[] {'.'}); string valueNoSex = stringFullResults[0]; if(valueNoSex.StartsWith("DjIndex") || valueNoSex.StartsWith("IndexQ") || valueNoSex.StartsWith("RjIndex") || valueNoSex.StartsWith(Constants.RJPotencyBoscoName) || valueNoSex == "IE" || valueNoSex == Constants.ArmsUseIndexName || valueNoSex == "FV" ) { mySerie.IsLeftAxis = false; } else { mySerie.IsLeftAxis = true; } myValueBefore = valueNoSex; //for changing later indexQ for indexQ*10 mySerie.Title = myValue; } else { if(myValueBefore.StartsWith("IndexQ")) { if(myValue == "-") { mySerie.SerieData.Add(myValue); } else { mySerie.SerieData.Add( ( Convert.ToDouble(myValue) *10).ToString() ); } mySerie.Title = myValueBefore.Replace("IndexQ", "IndexQ *10"); } else if(myValueBefore == "FV") { if(myValue == "-") { mySerie.SerieData.Add(myValue); } else { mySerie.SerieData.Add( ( Convert.ToDouble(myValue) *10).ToString() ); } mySerie.Title = myValueBefore.Replace("FV", "FV *10"); } else { mySerie.SerieData.Add(myValue); } } i++; } GraphSeries.Add(mySerie); } }
protected override void printData(string [] statValues) { //values are recorded for calculating later AVG and SD recordStatValues(statValues); if(sessions.Count == 1) { int i = 0; bool foundAVG = false; //we need to save this transposed foreach (string myValue in statValues) { if(i == 0) { if( myValue == Catalog.GetString("AVG")) foundAVG = true; else CurrentGraphData.XAxisNames.Add(myValue); } else if(i == 1) { if(foundAVG) serieResultPercent.Avg = Convert.ToDouble(myValue); else serieResultPercent.SerieData.Add(myValue); //2 is result and is not plotted } else if(i == 3) { if(foundAVG) serieJump1.Avg = Convert.ToDouble(myValue); else serieJump1.SerieData.Add(myValue); } else if(i == 4) { if(foundAVG) serieJump2.Avg = Convert.ToDouble(myValue); else serieJump2.SerieData.Add(myValue); } if(foundAVG && i == dataColumns) { //add created series to GraphSeries ArrayList //check don't do it two times if(GraphSeries.Count == 0) { GraphSeries.Add(serieJump1); GraphSeries.Add(serieJump2); GraphSeries.Add(serieResultPercent); } return; } i++; } } else { GraphSerie mySerie = new GraphSerie(); mySerie.IsLeftAxis = true; int i=0; foreach (string myValue in statValues) { if( myValue == Catalog.GetString("SD") ) return; if(i == 0) mySerie.Title = myValue; else if( i == sessions.Count + 1 ) { //eg, for 2 sessions: [(0)person name, (1)sess1, (2)sess2, (3)AVG] if(myValue != "-") mySerie.Avg = Convert.ToDouble(myValue); } else mySerie.SerieData.Add(myValue); i++; } GraphSeries.Add(mySerie); } }
public GraphRjPotencyBosco(StatTypeStruct myStatTypeStruct) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 6; //for Simplesession (index, tv(avg), tc(avg), jumps, time, fall) if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("Chronojump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = Constants.RJPotencyBoscoName; CurrentGraphData.GraphSubTitle = Constants.RJPotencyBoscoFormula; } if (sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieTc = new GraphSerie(); serieTv = new GraphSerie(); serieJumps = new GraphSerie(); serieTime = new GraphSerie(); serieFall = new GraphSerie(); serieIndex.Title = translateYesNo("Index"); serieTc.Title = translateYesNo("TC") + " (" + translateYesNo("AVG") + ")"; serieTv.Title = translateYesNo("TF") + " (" + translateYesNo("AVG") + ")"; //serieJumps.Title = translateYesNo("Jumps") + " *10"; //serieTime.Title = translateYesNo("Time") + " *10"; serieJumps.Title = translateYesNo("Jumps"); serieTime.Title = translateYesNo("Time"); serieFall.Title = translateYesNo("Fall"); serieIndex.IsLeftAxis = false; serieTc.IsLeftAxis = true; serieTv.IsLeftAxis = true; serieJumps.IsLeftAxis = false; serieTime.IsLeftAxis = false; serieFall.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("TC") + "(s), " + translateYesNo("TF") + "(s)"; CurrentGraphData.LabelRight = translateYesNo("Index") + "(%), " + translateYesNo("Jumps") + ", " + translateYesNo("Time") + "(s), " + translateYesNo("Fall") + "(cm)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = ""; } }
protected override void printData(string [] statValues) { //values are recorded for calculating later AVG and SD recordStatValues(statValues); if (sessions.Count == 1) { int i = 0; bool foundAVG = false; //we need to save this transposed foreach (string myValue in statValues) { if (i == 0) { //don't plot AVG and SD rows if (myValue == Catalog.GetString("AVG")) { foundAVG = true; } else { CurrentGraphData.XAxisNames.Add(myValue); } } else if (i == 1) { if (foundAVG) { serieIndex.Avg = Convert.ToDouble(myValue); } else { serieIndex.SerieData.Add(myValue); } } else if (i == 2) { if (foundAVG) { serieTv.Avg = Convert.ToDouble(myValue); } else { serieTv.SerieData.Add(myValue); } } else if (i == 3) { if (foundAVG) { serieTc.Avg = Convert.ToDouble(myValue); } else { serieTc.SerieData.Add(myValue); } } else if (i == 4) { //correct jumps and time for being displayed if (foundAVG) { //serieJumps.Avg = Convert.ToDouble(myValue) *10; serieJumps.Avg = Convert.ToDouble(myValue); } else { //serieJumps.SerieData.Add( (Convert.ToDouble(myValue) *10).ToString() ); serieJumps.SerieData.Add(myValue); } } else if (i == 5) { //correct jumps and time for being displayed if (foundAVG) { //serieTime.Avg = Convert.ToDouble(myValue) * 10; serieTime.Avg = Convert.ToDouble(myValue); } else { //serieTime.SerieData.Add( (Convert.ToDouble(myValue) *10).ToString() ); serieTime.SerieData.Add(myValue); } } else if (i == 6) { if (foundAVG) { serieFall.Avg = Convert.ToDouble(myValue); } else { serieFall.SerieData.Add(myValue); } } if (foundAVG && i == dataColumns) { //add created series to GraphSeries ArrayList //check don't do it two times if (GraphSeries.Count == 0) { GraphSeries.Add(serieTc); GraphSeries.Add(serieTv); GraphSeries.Add(serieIndex); GraphSeries.Add(serieJumps); GraphSeries.Add(serieTime); GraphSeries.Add(serieFall); } return; } i++; } } else { GraphSerie mySerie = new GraphSerie(); mySerie.IsLeftAxis = true; int i = 0; foreach (string myValue in statValues) { if (myValue == Catalog.GetString("SD")) { return; } if (i == 0) { mySerie.Title = myValue; } else if (i == sessions.Count + 1) //eg, for 2 sessions: [(0)person name, (1)sess1, (2)sess2, (3)AVG] { if (myValue != "-") { mySerie.Avg = Convert.ToDouble(myValue); } } else { mySerie.SerieData.Add(myValue); } i++; } GraphSeries.Add(mySerie); } }
public GraphJumpIndexes(StatTypeStruct myStatTypeStruct, string indexType) { completeConstruction (myStatTypeStruct, treeview); this.dataColumns = 3; //for Simplesession (index, jump1, jump2) this.indexType = indexType; //"IE" or Constants.ArmsUseIndexName or "IR" if(indexType == "IE") { jump1="CMJ"; jump2="SJ"; } else if(indexType == Constants.ArmsUseIndexName) { jump1="ABK"; jump2="CMJ"; } else if(indexType == "IRna") { //reactivity DJna jump1="DJna"; jump2="CMJ"; } else { //IRa //reactivity jump1="DJa"; jump2="CMJ"; } columnsString[0] = "Jumper"; columnsString[1] = indexType; columnsString[2] = jump1; if(useHeightsOnJumpIndexes) columnsString[2] = jump1 + " (" + translateYesNo("height") + ")"; columnsString[3] = jump2; if(useHeightsOnJumpIndexes) columnsString[3] = jump2 + " (" + translateYesNo("height") + ")"; if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if(myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); if(indexType == "IE") CurrentGraphData.GraphTitle = Constants.IeIndexFormula; else if(indexType == Constants.ArmsUseIndexName) CurrentGraphData.GraphTitle = Constants.ArmsUseIndexFormula; else if(indexType == "IRna") CurrentGraphData.GraphTitle = Constants.IRnaIndexFormula; else // indexType == "IRa" CurrentGraphData.GraphTitle = Constants.IRaIndexFormula; } if(sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieJump1 = new GraphSerie(); serieJump2 = new GraphSerie(); serieIndex.Title = indexType; serieJump1.Title = jump1; serieJump2.Title = jump2; serieIndex.IsLeftAxis = true; serieJump1.IsLeftAxis = false; serieJump2.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = jump1 + " " + translateYesNo("TF") + "(s), " + jump2 + " " + translateYesNo("TF") + "(s)"; if(useHeightsOnJumpIndexes) CurrentGraphData.LabelRight = jump1 + " " + translateYesNo("height") + "(m), " + jump2 + " " + translateYesNo("height") + "(m)"; } else { for(int i=0; i < sessions.Count ; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'}); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)"; CurrentGraphData.LabelRight = ""; } }
protected override void printData(string [] statValues) { //values are recorded for calculating later AVG and SD recordStatValues(statValues); if(sessions.Count == 1) { int i = 0; bool foundAVG = false; //we need to save this transposed foreach (string myValue in statValues) { if(i == 0) { //don't plot AVG and SD rows if( myValue == Catalog.GetString("AVG")) foundAVG = true; else CurrentGraphData.XAxisNames.Add(myValue); } else if(i == 1) { if(foundAVG) serieIndex.Avg = Convert.ToDouble(myValue); else serieIndex.SerieData.Add(myValue); } else if(i == 2) { if(foundAVG) serieJump1.Avg = Convert.ToDouble(myValue); else serieJump1.SerieData.Add(myValue); } else if(i == 3) { if(foundAVG) serieJump2.Avg = Convert.ToDouble(myValue); else serieJump2.SerieData.Add(myValue); } if(foundAVG && i == dataColumns) { //add created series to GraphSeries ArrayList //check don't do it two times if(GraphSeries.Count == 0) { GraphSeries.Add(serieJump1); GraphSeries.Add(serieJump2); GraphSeries.Add(serieIndex); } return; } i++; } } else { GraphSerie mySerie = new GraphSerie(); mySerie.IsLeftAxis = true; int i=0; foreach (string myValue in statValues) { if( myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD") ) { return; } if(i == 0) { mySerie.Title = myValue; } else { mySerie.SerieData.Add(myValue); } i++; } GraphSeries.Add(mySerie); } }
protected override void printData(string [] statValues) { //values are recorded for calculating later AVG and SD recordStatValues(statValues); if (sessions.Count == 1) { int i = 0; bool foundAVG = false; //we need to save this transposed foreach (string myValue in statValues) { if (i == 0) { //don't plot AVG and SD rows if (myValue == Catalog.GetString("AVG")) { foundAVG = true; } else { CurrentGraphData.XAxisNames.Add(myValue); } } else if (i == 1) { if (foundAVG) { serieIndex.Avg = Convert.ToDouble(myValue); } else { serieIndex.SerieData.Add(myValue); } } else if (i == 2) { if (foundAVG) { serieJump1.Avg = Convert.ToDouble(myValue); } else { serieJump1.SerieData.Add(myValue); } } else if (i == 3) { if (foundAVG) { serieJump2.Avg = Convert.ToDouble(myValue); } else { serieJump2.SerieData.Add(myValue); } } if (foundAVG && i == dataColumns) { //add created series to GraphSeries ArrayList //check don't do it two times if (GraphSeries.Count == 0) { GraphSeries.Add(serieJump1); GraphSeries.Add(serieJump2); GraphSeries.Add(serieIndex); } return; } i++; } } else { GraphSerie mySerie = new GraphSerie(); mySerie.IsLeftAxis = true; int i = 0; foreach (string myValue in statValues) { if (myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD")) { return; } if (i == 0) { mySerie.Title = myValue; } else { mySerie.SerieData.Add(myValue); } i++; } GraphSeries.Add(mySerie); } }
protected override void printData(string [] statValues) { //values are recorded for calculating later AVG and SD recordStatValues(statValues); if(sessions.Count == 1) { int i = 0; bool foundAVG = false; //we need to save this transposed foreach (string myValue in statValues) { if(i == 0) { //don't plot AVG and SD rows if( myValue == Catalog.GetString("AVG")) foundAVG = true; else CurrentGraphData.XAxisNames.Add(myValue); } else if(i == 1) { if(foundAVG) serieIndex.Avg = Convert.ToDouble(myValue); else serieIndex.SerieData.Add(myValue); } else if(i == 2) { if(foundAVG) serieTv.Avg = Convert.ToDouble(myValue); else serieTv.SerieData.Add(myValue); } else if(i == 3) { if(foundAVG) serieTc.Avg = Convert.ToDouble(myValue); else serieTc.SerieData.Add(myValue); } else if(i == 4) { //correct jumps and time for being displayed if(foundAVG) //serieJumps.Avg = Convert.ToDouble(myValue) *10; serieJumps.Avg = Convert.ToDouble(myValue); else //serieJumps.SerieData.Add( (Convert.ToDouble(myValue) *10).ToString() ); serieJumps.SerieData.Add(myValue); } else if(i == 5) { //correct jumps and time for being displayed if(foundAVG) //serieTime.Avg = Convert.ToDouble(myValue) * 10; serieTime.Avg = Convert.ToDouble(myValue); else //serieTime.SerieData.Add( (Convert.ToDouble(myValue) *10).ToString() ); serieTime.SerieData.Add(myValue); } else if(i == 6) { if(foundAVG) serieFall.Avg = Convert.ToDouble(myValue); else serieFall.SerieData.Add(myValue); } if(foundAVG && i == dataColumns) { //add created series to GraphSeries ArrayList //check don't do it two times if(GraphSeries.Count == 0) { GraphSeries.Add(serieTc); GraphSeries.Add(serieTv); GraphSeries.Add(serieIndex); GraphSeries.Add(serieJumps); GraphSeries.Add(serieTime); GraphSeries.Add(serieFall); } return; } i++; } } else { GraphSerie mySerie = new GraphSerie(); mySerie.IsLeftAxis = true; int i=0; foreach (string myValue in statValues) { if( myValue == Catalog.GetString("SD") ) return; if(i == 0) mySerie.Title = myValue; else if( i == sessions.Count + 1 ) { //eg, for 2 sessions: [(0)person name, (1)sess1, (2)sess2, (3)AVG] if(myValue != "-") mySerie.Avg = Convert.ToDouble(myValue); } else mySerie.SerieData.Add(myValue); i++; } GraphSeries.Add(mySerie); } }
protected override void printData(string [] statValues) { /* * if one day i found the way of plotting different (single plots) i will use it for the numContinuous */ /* if(numContinuous != -1) { int bestPos = findBestContinuous(statValues, numContinuous); if(bestPos != -1) { statValues = markBestContinuous(statValues, numContinuous, bestPos); } } */ GraphSerie serieSpeed = new GraphSerie(); serieSpeed.IsLeftAxis = true; int i = 0; foreach (string myValue in statValues) { if(i==0) serieSpeed.Title = myValue; else if(i >= 2) serieSpeed.SerieData.Add(myValue); //i==1 is the avg speed, is not used i++; } //add created series to GraphSeries ArrayList GraphSeries.Add(serieSpeed); }
public GraphGlobal(StatTypeStruct myStatTypeStruct, int personID, string personName) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 1; //for Simplesession this.personID = personID; this.personName = personName; //this.heightPreferred = heightPreferred; if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = ""; } if (sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieTv = new GraphSerie(); serieIndex.Title = translateYesNo("Value"); if (heightPreferred) { serieTv.Title = translateYesNo("Height"); } else { serieTv.Title = translateYesNo("TF"); } serieIndex.IsLeftAxis = false; serieTv.IsLeftAxis = true; if (heightPreferred) { CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)"; } else { CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)"; } CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } if (heightPreferred) { CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)"; } else { CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)"; } //CurrentGraphData.LabelRight = ""; CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)"; } }
public GraphDjPower(StatTypeStruct myStatTypeStruct) { completeConstruction(myStatTypeStruct, treeview); this.dataColumns = 6; //for Simplesession (index, height, tv, tc, fall, weight) if (statsJumpsType == 2) { this.operation = "MAX"; } else { this.operation = "AVG"; } CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph"); //title is shown on the graph except it's a report, then title will be on the html if (myStatTypeStruct.ToReport) { CurrentGraphData.GraphTitle = ""; } else { //CurrentGraphData.GraphTitle = this.ToString(); CurrentGraphData.GraphTitle = Constants.DjPowerFormula; } if (sessions.Count == 1) { //four series, the four columns serieIndex = new GraphSerie(); serieHeight = new GraphSerie(); serieTc = new GraphSerie(); serieTv = new GraphSerie(); serieFall = new GraphSerie(); serieWeight = new GraphSerie(); serieIndex.Title = translateYesNo("Dj Index"); serieHeight.Title = translateYesNo("Height"); serieTc.Title = translateYesNo("TC"); serieTv.Title = translateYesNo("TF"); serieFall.Title = translateYesNo("Fall"); serieWeight.Title = translateYesNo("Weight"); serieIndex.IsLeftAxis = false; serieHeight.IsLeftAxis = false; serieTc.IsLeftAxis = true; serieTv.IsLeftAxis = true; serieFall.IsLeftAxis = false; serieWeight.IsLeftAxis = false; CurrentGraphData.LabelLeft = translateYesNo("TC") + "(s), " + translateYesNo("TF") + "(s)"; CurrentGraphData.LabelRight = translateYesNo("Index") + "(%), " + translateYesNo("Height") + "(cm), " + translateYesNo("Fall") + "(cm), " + translateYesNo("Weight") + "(Kg)"; } else { for (int i = 0; i < sessions.Count; i++) { string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' }); CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString()); } CurrentGraphData.LabelLeft = translateYesNo("Power") + "(W)"; CurrentGraphData.LabelRight = ""; } }