Esempio n. 1
0
        /// <summary>
        /// 与えられたデータ範囲から,Y軸の範囲などを決定します.
        /// </summary>
        /// <param name="range"></param>
        public void DefineYAxis(Range range)
        {
            decimal y_interval = DefineInterval(range.Width);
            var     y_min      = decimal.Floor(range.Start / y_interval) * y_interval;
            var     y_max      = decimal.Ceiling(range.Stop / y_interval) * y_interval;

            YAxis = new ChartAxisSettings
            {
                Range = new Range(y_min, y_max),
                Tics  = new AxisTicsSettings {
                    Start = y_min, Stop = y_max, Increase = y_interval, Rotate = false
                }
            };
        }
Esempio n. 2
0
        /// <summary>
        /// 与えられたデータ範囲から,X軸の範囲などを決定します.
        /// </summary>
        /// <param name="range"></param>
        public void DefineXAxis(Range range)
        {
            decimal x_interval = DefineInterval(range.Width);
            var     x_min      = decimal.Floor(range.Start / x_interval) * x_interval;
            var     x_max      = decimal.Ceiling(range.Stop / x_interval) * x_interval;

            XAxis = new ChartAxisSettings
            {
                Range = new Range(x_min, x_max),
                Tics  = new AxisTicsSettings {
                    Start = x_min, Stop = x_max, Increase = x_interval, Mirror = true
                }
            };
        }