示例#1
0
 public void UpdateDefaults(ScaleDefaults defaults)
 {
     if (this.Defaults.Equals((object)defaults))
     {
         return;
     }
     this.Defaults = defaults;
     this.Invalidate();
 }
示例#2
0
        public override bool Equals(object obj)
        {
            ScaleDefaults scaleDefaults = (ScaleDefaults)obj;

            if (scaleDefaults.MaxAllowedMargin == this.MaxAllowedMargin)
            {
                return(scaleDefaults.IncludeZero == this.IncludeZero);
            }
            return(false);
        }
示例#3
0
        internal virtual ScaleDefaults AggregateScaleDefaults(Axis axis)
        {
            ScaleDefaults scaleDefaults = new ScaleDefaults();

            if (axis.Orientation == AxisOrientation.X)
            {
                foreach (XYSeries xySeries in this.Series)
                {
                    if (xySeries.XAxisName == axis.Name)
                    {
                        scaleDefaults += xySeries.XScaleDefaults;
                    }
                }
                return(scaleDefaults);
            }
            foreach (XYSeries xySeries in this.Series)
            {
                if (xySeries.YAxisName == axis.Name)
                {
                    scaleDefaults += xySeries.YScaleDefaults;
                }
            }
            return(scaleDefaults);
        }
示例#4
0
 public ScaleDefaults(AutoBool includeZero, double maxAllowedMargin)
 {
     this                  = new ScaleDefaults();
     this.IncludeZero      = includeZero;
     this.MaxAllowedMargin = maxAllowedMargin;
 }
示例#5
0
 public ScaleDefaults(AutoBool includeZero, double maxAllowedMargin)
 {
     this = new ScaleDefaults();
     this.IncludeZero = includeZero;
     this.MaxAllowedMargin = maxAllowedMargin;
 }
示例#6
0
 internal virtual ScaleDefaults AggregateScaleDefaults(Axis axis)
 {
     ScaleDefaults scaleDefaults = new ScaleDefaults();
     if (axis.Orientation == AxisOrientation.X)
     {
         foreach (XYSeries xySeries in this.Series)
         {
             if (xySeries.XAxisName == axis.Name)
                 scaleDefaults += xySeries.XScaleDefaults;
         }
         return scaleDefaults;
     }
     foreach (XYSeries xySeries in this.Series)
     {
         if (xySeries.YAxisName == axis.Name)
             scaleDefaults += xySeries.YScaleDefaults;
     }
     return scaleDefaults;
 }