private void SetUpChart_Stacked(DataSet _ds) { barChart.Type = GraphBarChart.StackedType.Normal; barChart.MeasureColumns.Add(v_HSCWWoDisSchoolDistStateEconELPXYearRate.Regular_Diplomas_Percent); barChart.MeasureColumns.Add(v_HSCWWoDisSchoolDistStateEconELPXYearRate.HSEDs_Percent); barChart.MeasureColumns.Add(v_HSCWWoDisSchoolDistStateEconELPXYearRate.Certificates_Percent); if (GlobalValues.CompareTo.Key != CompareToKeys.Current) { barChart.LabelColumnName = ColumnPicker.GetCompareToColumnName(GlobalValues); } else { if (GlobalValues.TmFrm.Key == TmFrmKeys.All && GlobalValues.Group.Key == GroupKeys.All) { barChart.LabelColumnName = v_HSCWWoDisSchoolDistStateEconELPXYearRate.TimeFrameLabel; } else if (GlobalValues.TmFrm.Key != TmFrmKeys.All) { barChart.OverrideAxisXLabels.Add("Both Groups Combined", "All Students"); } else { barChart.LabelColumnName = ColumnPicker.GetViewByColumnName(GlobalValues); } } barChart.OverrideSeriesLabels.Add(v_HSCWWoDisSchoolDistStateEconELP.HSEDs, "HSED"); }
public static String GetLabelsColumnDefault(GlobalValues globals) { if (globals.CompareTo.Key == CompareToKeys.Current || globals.STYP.Key != STYPKeys.AllTypes) { return(ColumnPicker.GetViewByColumnName(globals)); } else { return(ColumnPicker.CommonGraphNames.SchooltypeLabel.ToString()); } }
private void SetUpChart_Bar(DataSet _ds) { try { if (GlobalValues.HighSchoolCompletion.Key == HighSchoolCompletionKeys.Certificate) { barChart.DisplayColumnName = v_HSCWWoDisSchoolDistStateEconELPXYearRate.Certificates_Percent; } else if (GlobalValues.HighSchoolCompletion.Key == HighSchoolCompletionKeys.HSED) { barChart.DisplayColumnName = v_HSCWWoDisSchoolDistStateEconELPXYearRate.HSEDs_Percent; } else if (GlobalValues.HighSchoolCompletion.Key == HighSchoolCompletionKeys.Regular) { barChart.DisplayColumnName = v_HSCWWoDisSchoolDistStateEconELPXYearRate.Regular_Diplomas_Percent; } else if (GlobalValues.HighSchoolCompletion.Key == HighSchoolCompletionKeys.Summary) { barChart.DisplayColumnName = v_HSCWWoDisSchoolDistStateEconELPXYearRate.Combined_Percent; } if (GlobalValues.CompareTo.Key == CompareToKeys.Current) { if (GlobalValues.TmFrm.Key == TmFrmKeys.All) { barChart.SeriesColumnName = v_HSCWWoDisSchoolDistStateEconELPXYearRate.TimeFrameLabel; barChart.LabelColumnName = ColumnPicker.GetViewByColumnName(GlobalValues); } } else { if (GlobalValues.TmFrm.Key == TmFrmKeys.All) { barChart.SeriesColumnName = ColumnPicker.GetCompareToColumnName(GlobalValues); barChart.LabelColumnName = v_HSCWWoDisSchoolDistStateEconELPXYearRate.TimeFrameLabel; } } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } }
private void SetGraphSeriesAndAxisLabelColumns_StackedBar() { barChart.SeriesColumnName = v_WSAS.Level; if (disaggFlags[GlobalValues.Group.Name] || disaggFlags[GlobalValues.SubjectID.Name]) { // if (groupIsDisagg && subjectIsDisagg) never happens in stacked bar if (disaggFlags[GlobalValues.Group.Name]) { barChart.LabelColumnName = ColumnPicker.GetViewByColumnName(GlobalValues); } else { barChart.LabelColumnName = v_WSAS.SubjectLabel; } } else if (disaggFlags[GlobalValues.CompareTo.Name]) { if (disaggFlags[GlobalValues.Level.Name]) { barChart.LabelColumnName = ColumnPicker.GetCompareToColumnName(GlobalValues); } else { barChart.LabelColumnName = v_WSAS.GradeShortLabel; } } else { if (disaggFlags[GlobalValues.Grade.Name]) { barChart.LabelColumnName = v_WSAS.GradeShortLabel; } else { barChart.FriendlyAxisXNames = new List <String>(new string[] { "All Students" }); } } }
private void SetUpHorizChart(DataSet ds) { try { if (GlobalValues.Group.Key == GroupKeys.Grade) { //override the default orderby since will use GradeLabel, instead of GradeCode List <String> order = new List <String>(QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns).ToArray()); hrzBarChart.OrderBy = String.Join(",", order.ToArray()); } else if (GlobalValues.Group.Key == GroupKeys.Race) { List <String> grOrder = new List <string>(QueryMarshaller.BuildOrderByList(DataSet.Tables[0].Columns).ToArray()); grOrder.Insert(1, v_SuspExpIncidentsWWoDisSchoolDistState.Race); hrzBarChart.OrderBy = String.Join(",", grOrder.ToArray()); } hrzBarChart.YAxisSuffix = String.Empty; hrzBarChart.Title = DataSetTitle; if (GlobalValues.Group.Key == GroupKeys.Grade) { hrzBarChart.AutoHeightIncreaseFactor = 25; } if (GlobalValues.CompareTo.Key == CompareToKeys.Current) { hrzBarChart.LabelColumns.Add( (GlobalValues.OrgLevel.Key == OrgLevelKeys.School)? v_SuspExpIncidentsWWoDisSchoolDistState.School_Name : v_SuspExpIncidentsWWoDisSchoolDistState.District_Name ); } else { hrzBarChart.LabelColumns.Add(ColumnPicker.GetCompareToColumnName(GlobalValues)); } if (GlobalValues.Group.Key != GroupKeys.All) { hrzBarChart.LabelColumns.Add(ColumnPicker.GetViewByColumnName(GlobalValues)); } if (GlobalValues.CompareTo.Key != CompareToKeys.SelDistricts && GlobalValues.CompareTo.Key != CompareToKeys.SelSchools) { hrzBarChart.SelectedSortBySecondarySort = false; } hrzBarChart.OverrideSeriesLabels = new Hashtable(6); //MEASURE COLUMNS: if (GlobalValues.Weapon.Key == WeaponKeys.Yes) { hrzBarChart.MeasureColumns = new List <String>(new String[] { v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugAllSusp, v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugExp }); hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugAllSusp, "% Suspended"); hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCWeaponDrugExp, "% Expelled"); } else { hrzBarChart.MeasureColumns = new List <String>(new String[] { v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugAllSusp, v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugExp }); hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugAllSusp, "% Suspended"); hrzBarChart.OverrideSeriesLabels.Add(v_SuspExpIncidentsWWoDisSchoolDistState.PRCNonWeaponDrugExp, "% Expelled"); } hrzBarChart.AxisYDescription = "Percent of Incidents"; } catch (Exception ex) { if (GlobalValues.TraceLevels > 0) { throw ex; } System.Diagnostics.Debug.WriteLine(ex.Message); } }
private void SetGraphSeriesAndAxisLabelColumns_SingleBar() { barChart.LegendBox.Visible = (CountDimensions(disaggFlags) > 1); if (disaggFlags[GlobalValues.CompareTo.Name] == false) { if (disaggFlags[GlobalValues.Grade.Name]) { if (!disaggFlags[GlobalValues.Group.Name] && !disaggFlags[GlobalValues.SubjectID.Name]) { barChart.LabelColumnName = v_WSAS.GradeShortLabel; } else if (disaggFlags[GlobalValues.Group.Name]) // and if both IsDisagg { barChart.LabelColumnName = ColumnPicker.GetViewByColumnName(GlobalValues); } else // if only subject IsDisagg { barChart.LabelColumnName = v_WSAS.SubjectLabel; } } else //if (gradeIsDisagg == false) { if (disaggFlags[GlobalValues.Group.Name]) { barChart.LabelColumnName = ColumnPicker.GetViewByColumnName(GlobalValues); } else if (disaggFlags[GlobalValues.SubjectID.Name]) { barChart.LabelColumnName = v_WSAS.SubjectLabel; } else { barChart.FriendlyAxisXNames = new List <String>(new string[] { "All Students" }); } } } else //if (compareToIsDisagg) { if (!disaggFlags[GlobalValues.Group.Name] && !disaggFlags[GlobalValues.SubjectID.Name]) { if (!disaggFlags[GlobalValues.Group.Name] && !disaggFlags[GlobalValues.Grade.Name]) { barChart.FriendlyAxisXNames = new List <String>(new string[] { "All Students" }); } else if (!disaggFlags[GlobalValues.Grade.Name]) { barChart.LabelColumnName = ColumnPicker.GetCompareToColumnName(GlobalValues); } else { barChart.LabelColumnName = v_WSAS.GradeShortLabel; } } else if (disaggFlags[GlobalValues.Group.Name]) { barChart.LabelColumnName = ColumnPicker.GetViewByColumnName(GlobalValues); } else // if (subjectIsDisagg) { barChart.LabelColumnName = v_WSAS.SubjectLabel; } } if (CountDimensions(disaggFlags) > 1) { if (disaggFlags[GlobalValues.CompareTo.Name]) { barChart.SeriesColumnName = ColumnPicker.GetCompareToColumnName(GlobalValues); } else { if (disaggFlags[GlobalValues.Grade.Name]) { barChart.SeriesColumnName = v_WSAS.GradeShortLabel; } else { barChart.SeriesColumnName = v_WSAS.SubjectLabel; } } } else if (!disaggFlags[GlobalValues.Group.Name]) // All Students { barChart.SeriesColumnName = ColumnPicker.GetCompareToColumnName(GlobalValues); barChart.LegendBox.Visible = true; // not sure why this is necessary!! but not visible without it } if (barChart.SeriesColumnName == barChart.LabelColumnName) //Assumption is that Series column is defaulting to CompareTo and should not be used { barChart.SeriesColumnName = ColumnPicker.GetViewByColumnName(GlobalValues); } }