internal void ComputeScaleBreaks() { if (Area != null) { if (Area.AreaType != ChartAreaType.CartesianAxes || ZoomFactor != 1 || ZoomPosition != 0 || IsDefaultRange) { GenerateDefaultLabel(); return; } var registeredSeries = RegisteredSeries; if (registeredSeries.Count == 0 || registeredSeries.Any(series => ((!(series is CartesianSeries)) || series is StackingSeriesBase))) { GenerateDefaultLabel(); return; } GetSeriesYValues(registeredSeries); CalculateScaleBreaksRanges(registeredSeries); NumericalAxisHelper.GenerateScaleBreakVisibleLabels(this, Interval, SmallTicksPerInterval); } else { ClearBreakElements(); GenerateDefaultLabel(); } }
/// <summary> /// Method implementation for Generate Labels in ChartAxis /// </summary> protected override void GenerateVisibleLabels() { SetRangeForAxisStyle(); ClearBreakElements(); if (AxisScaleBreaks.Count > 0 && this.IsSecondaryAxis && CustomLabels.Count == 0 && LabelsSource == null) { ComputeScaleBreaks(); } else { NumericalAxisHelper.GenerateVisibleLabels(this, Minimum, Maximum, Interval, SmallTicksPerInterval); } }
/// <summary> /// Apply padding based on interval /// </summary> /// <param name="range"></param> /// <param name="interval"></param> /// <returns></returns> protected override DoubleRange ApplyRangePadding(DoubleRange range, double interval) { if (Minimum == null && Maximum == null) // Executes when Minimum and Maximum aren't set. { return(NumericalAxisHelper.ApplyRangePadding(this, base.ApplyRangePadding(range, interval), interval, ActualRangePadding)); } else if (Minimum != null && Maximum != null) // Executes when Minimum and Maximum are set. { return(range); } else { // Executes when either Minimum or Maximum is set. DoubleRange baseRange = NumericalAxisHelper.ApplyRangePadding(this, base.ApplyRangePadding(range, interval), interval, ActualRangePadding); return(Minimum != null ? new DoubleRange(range.Start, baseRange.End) : new DoubleRange(baseRange.Start, range.End)); } }
/// <summary> /// Updates the axis when minimum or maximum value changed. /// </summary> private void OnMinMaxChanged() { NumericalAxisHelper.OnMinMaxChanged(this, this.Maximum, this.Minimum); }
/// <summary> /// Method implementation for Generate Labels in ChartAxis /// </summary> protected override void GenerateVisibleLabels() { NumericalAxisHelper.GenerateVisibleLabels3D(this, this.Minimum, this.Maximum, this.Interval, this.SmallTicksPerInterval); }
/// <summary> /// Calculates the visible range. /// </summary> protected internal override void CalculateVisibleRange(Size avalableSize) { base.CalculateVisibleRange(avalableSize); NumericalAxisHelper.CalculateVisibleRange(this, avalableSize, Interval); }
private void GenerateDefaultLabel() { VisibleLabels.Clear(); SmallTickPoints.Clear(); NumericalAxisHelper.GenerateVisibleLabels(this, Minimum, Maximum, Interval, SmallTicksPerInterval); }