/// <summary> /// When adding charts, related fields can be used either as values for the /// ChartMedia NormalizeField property. Specify the name of the relate (as read from the /// GDB), the name of the field in the related table, and the statistic to use when /// Normalizing. /// </summary> /// <param name="relateName"></param> /// <param name="fieldName"></param> /// <param name="statistic"></param> /// <returns></returns> public static string FormatRelatedFieldName(string relateName, string fieldName, RelateFieldStatistic statistic) { string format = "{0}\\{1}:"; switch (statistic) { case RelateFieldStatistic.Count: format += "COUNT"; break; case RelateFieldStatistic.Minimum: format += "MIN"; break; case RelateFieldStatistic.Maximum: format += "MAX"; break; case RelateFieldStatistic.Sum: format += "SUM"; break; case RelateFieldStatistic.Mean: format += "MEAN"; break; case RelateFieldStatistic.StandardDeviation: format += "STDDEV"; break; default: throw new ArgumentException(String.Format("{0} is not a valid statistic value", statistic)); } return(String.Format(format, relateName, fieldName)); }
/// <summary> /// When adding charts, related fields can be used either as values for the /// ChartMedia NormalizeField property. Specify the name of the relate (as read from the /// GDB), the name of the field in the related table, and the statistic to use when /// Normalizing. /// </summary> /// <param name="relateName"></param> /// <param name="fieldName"></param> /// <param name="statistic"></param> /// <returns></returns> public static string FormatRelatedFieldName(string relateName, string fieldName, RelateFieldStatistic statistic) { string format = "{0}\\{1}:"; switch (statistic) { case RelateFieldStatistic.Count: format += "COUNT"; break; case RelateFieldStatistic.Minimum: format += "MIN"; break; case RelateFieldStatistic.Maximum: format += "MAX"; break; case RelateFieldStatistic.Sum: format += "SUM"; break; case RelateFieldStatistic.Mean: format += "MEAN"; break; case RelateFieldStatistic.StandardDeviation: format += "STDDEV"; break; default: throw new ArgumentException(String.Format("{0} is not a valid statistic value", statistic)); } return String.Format(format, relateName, fieldName); }