wzwyc

自己写柱形图的时候需要用到,函数写到一半,采用的方法弃用了,代码备份。

        private double[] GetYValues(double maxValue, double minValue)
        {
            Debug.Assert(maxValue > minValue);

            List<double> MyList = new List<double>();

            if (maxValue > 1)
            {
                int baseValue = 1;
                while (maxValue > baseValue * 10)
                {
                    baseValue *= 10;
                }

                var maxIndex = Math.Ceiling(maxValue / baseValue);
                var minIndex = Math.Floor(minValue / baseValue);

                for (var i = minIndex; i <= maxIndex; i++)
                {
                    MyList.Add(i * baseValue);
                }
            }

            return MyList.ToArray();
        }

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-01-27
猜你喜欢
  • 2022-01-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案