/// <summary>
        /// Add data bar with specified CFVOs for start and end values, as well as color.
        /// </summary>
        /// <param name="cfvoList"></param>
        /// <param name="color"></param>
        /// <returns></returns>
        public CFRule AddDataBar(CFVO start, CFVO end, Color color)
        {
            CFRule  rule = new CFRule(CFType.DataBar);
            DataBar db   = new DataBar();

            db.CFVOList = new List <CFVO>();
            db.CFVOList.Add(start);
            db.CFVOList.Add(end);
            db.Color     = color;
            rule.DataBar = db;
            AddRule(rule);
            return(rule);
        }
        private static List <CFVO> GenerateCFVOs(IconSetType iconSetType)
        {
            int         numberOfIcons = GetNumberOfIcons(iconSetType);
            decimal     step          = 100.0m / numberOfIcons;
            List <CFVO> list          = new List <CFVO>();

            for (int i = 0; i < numberOfIcons; i++)
            {
                int  percent = (int)Math.Round(i * step);
                CFVO cfvo    = new CFVO
                {
                    Type  = CFVOType.Percent,
                    Value = percent.ToString()
                };
                list.Add(cfvo);
            }
            return(list);
        }
        public static ColorScale TwoColor(Color minimum, Color maximum)
        {
            ColorScale cs      = new ColorScale();
            var        cfvoMin = new CFVO
            {
                Type = CFVOType.Min
            };
            var cfvoMax = new CFVO
            {
                Type = CFVOType.Max
            };

            cs.CFVOList.Add(cfvoMin);
            cs.CFVOList.Add(cfvoMax);
            cs.Colors.Add(minimum);
            cs.Colors.Add(maximum);
            return(cs);
        }