/// <summary> /// Calculates actual range. /// </summary> /// <returns>Returns the calculated range.</returns> protected override DoubleRange CalculateActualRange() { if (this.Minimum == null && this.Maximum == null) { // Executes when Minimum and Maximum aren't set. return(LogarithmicAxisHelper.CalculateActualRange(this, base.CalculateActualRange(), this.LogarithmicBase)); } else if (this.Minimum != null && this.Maximum != null) { // Executes when Minimum and Maximum aren set. return(this.ActualRange); } else { // Executes when either Minimum or Maximum is set. DoubleRange range = this.CalculateBaseActualRange(); range = LogarithmicAxisHelper.CalculateActualRange(this, range, this.LogarithmicBase); if (this.Minimum != null) { return(new DoubleRange(ActualRange.Start, range.End)); } else if (this.Maximum != null) { return(new DoubleRange(range.Start, ActualRange.End)); } return(range); } }
protected override DoubleRange CalculateActualRange() { if (Minimum == null && Maximum == null) // Executes when Minimum and Maximum aren't set. { DoubleRange range = LogarithmicAxisHelper.CalculateActualRange(this, CalculateBaseActualRange(), LogarithmicBase); // Execute when include the annotion range for Auto Range if (IncludeAnnotationRange) { foreach (var annotation in (Area as SfChart).Annotations) { if (Orientation == Orientation.Vertical && annotation.CoordinateUnit == CoordinateUnit.Axis && annotation.YAxis == this) { range += new DoubleRange( Annotation.ConvertData(annotation.Y1, this), annotation is TextAnnotation ? Annotation.ConvertData(annotation.Y1, this) : annotation is ImageAnnotation ? Annotation.ConvertData((annotation as ImageAnnotation).Y2, this) : Annotation.ConvertData((annotation as ShapeAnnotation).Y2, this)); } else if (Orientation == Orientation.Horizontal && annotation.CoordinateUnit == CoordinateUnit.Axis && annotation.XAxis == this) { range += new DoubleRange( Annotation.ConvertData(annotation.X1, this), annotation is TextAnnotation ? Annotation.ConvertData(annotation.X1, this) : annotation is ImageAnnotation ? Annotation.ConvertData((annotation as ImageAnnotation).X2, this) : Annotation.ConvertData((annotation as ShapeAnnotation).X2, this)); } } } return(range); } else if (Minimum != null && Maximum != null) // Executes when Minimum and Maximum is set. { return(ActualRange); } else { // Executes when either Minimum or Maximum is set. DoubleRange range = CalculateBaseActualRange(); range = LogarithmicAxisHelper.CalculateActualRange(this, range, LogarithmicBase); if (Minimum != null) { return(new DoubleRange(ActualRange.Start, range.End)); } if (Maximum != null) { return(new DoubleRange(range.Start, ActualRange.End)); } return(range); } }
private void OnMinMaxChanged() { LogarithmicAxisHelper.OnMinMaxChanged(this, Minimum, Maximum, LogarithmicBase); }
/// <summary> /// Method implementation for Generate Labels in ChartAxis /// </summary> protected override void GenerateVisibleLabels() { SetRangeForAxisStyle(); LogarithmicAxisHelper.GenerateVisibleLabels(this, Minimum, Maximum, Interval, LogarithmicBase); }
/// <summary> /// Calculates the visible range. /// </summary> protected internal override void CalculateVisibleRange(Size avalableSize) { base.CalculateVisibleRange(avalableSize); LogarithmicAxisHelper.CalculateVisibleRange(this, avalableSize, Interval); }
/// <summary> /// Method implementation for Add SmallTicks for axis /// </summary> /// <param name="position"></param> /// <param name="logarithmicBase"></param> protected internal override void AddSmallTicksPoint(double position, double logarithmicBase) { LogarithmicAxisHelper.AddSmallTicksPoint(this, position, logarithmicBase, SmallTicksPerInterval); }
/// <summary> /// Calculates nice interval /// </summary> /// <param name="actualRange"></param> /// <param name="availableSize"></param> /// <returns></returns> protected internal override double CalculateNiceInterval(DoubleRange actualRange, Size availableSize) { return(LogarithmicAxisHelper.CalculateNiceInterval(this, actualRange, availableSize)); }
/// <summary> /// Method implementation for Generate Labels in ChartAxis /// </summary> protected override void GenerateVisibleLabels() { LogarithmicAxisHelper.GenerateVisibleLabels3D(this, this.Minimum, this.Maximum, this.Interval, this.LogarithmicBase); }