コード例 #1
0
        Axis _Axis; // Display properties for the value axis.

        #endregion Fields

        #region Constructors

        internal ValueAxis(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Axis=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Axis":
                        _Axis = new Axis(r, this, xNodeLoop);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown ValueAxis element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
        }
コード例 #2
0
        protected void SetIncrementAndInterval(Report rpt, Axis a, double min, double max, out double incr, out int interval)
        {
            interval = _gridIncrs; //PJR 20071113 - gridincrements set by Max value now                 // assume an interval count of 10 to start

            if (a.MajorInterval != null)
            {
                incr = a.MajorInterval.EvaluateDouble(rpt, ChartRow);
                if (incr.CompareTo(double.MinValue) == 0)
                    incr = (max - min)/interval;
                else
                {
                    interval = ((int) (Math.Abs(max - min)/incr));
                }
            }
            else
                incr = (max - min)/interval;

            return;
        }