Axis _Axis;		// Display properties for the value axis.		
	
		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;
				}
			}
		}
        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, this.ChartRow);
                if (incr.CompareTo(double.MinValue) == 0)
                    incr = (max - min) / interval;
                else
                {
                    interval = (int)((int)(Math.Abs(max - min) / incr));
                }
            }
            else
                incr = (max - min) / interval;

            return;
        }
Exemple #3
0
 protected void SetIncrementAndInterval(Report rpt, Axis a, double min, double max, out double incr, out int interval)
 {
     interval = this._gridIncrs;
       if (a.MajorInterval != null)
       {
     incr = a.MajorInterval.EvaluateDouble(rpt, this.ChartRow);
     if (((double)incr).CompareTo(double.MinValue) == 0)
     {
       incr = (max - min) / ((double)interval);
     }
     else
     {
       interval = (int)(Math.Abs((double)(max - min)) / incr);
     }
       }
       else
       {
     incr = (max - min) / ((double)interval);
       }
 }