コード例 #1
0
        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();
            }
        }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
0
 /// <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));
     }
 }
コード例 #4
0
ファイル: NumericalAxis3D.cs プロジェクト: ibebbs/Uno.SfChart
 /// <summary>
 /// Updates the axis when minimum or maximum value changed.
 /// </summary>
 private void OnMinMaxChanged()
 {
     NumericalAxisHelper.OnMinMaxChanged(this, this.Maximum, this.Minimum);
 }
コード例 #5
0
ファイル: NumericalAxis3D.cs プロジェクト: ibebbs/Uno.SfChart
 /// <summary>
 /// Method implementation for Generate Labels in ChartAxis
 /// </summary>
 protected override void GenerateVisibleLabels()
 {
     NumericalAxisHelper.GenerateVisibleLabels3D(this, this.Minimum, this.Maximum, this.Interval, this.SmallTicksPerInterval);
 }
コード例 #6
0
 /// <summary>
 /// Calculates the visible range.
 /// </summary>
 protected internal override void CalculateVisibleRange(Size avalableSize)
 {
     base.CalculateVisibleRange(avalableSize);
     NumericalAxisHelper.CalculateVisibleRange(this, avalableSize, Interval);
 }
コード例 #7
0
 private void GenerateDefaultLabel()
 {
     VisibleLabels.Clear();
     SmallTickPoints.Clear();
     NumericalAxisHelper.GenerateVisibleLabels(this, Minimum, Maximum, Interval, SmallTicksPerInterval);
 }