SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


Hi All,

I’m using a logarithmicNumericAxis but I think that’s irrelevant to the problem. I’ve set Major and Minor Delta’s to 1 and autoticks to false and this puts everything on the chart as i want it.

The problem appears when our data range Y values are very close together and fall between the limits of the deltas. SciChart does its thing and AutoRanges to best display the series but this means the Y axis has no scale values on it. The delta markers appear as you drag the axis down as you might expect.

Is there an easy way to tell SciChart to autoscale but include at least 1 major delta? or perhaps interrogate the chart to see if a delta is visible and rescale it manually if not?
Currently I’m considering checking the data prior to creating the series and setting the range accordingly.

Any thoughts would be appreciated đŸ™‚

  • You must to post comments
Best Answer

Hi Stuart,

The AutoTicks feature is a bit simple, and allows basic control over a chart Axis tick frequency output.

If you want fine-grained control e.g. to adaptively change the ticks when zooming, then I suggest looking at the TickProvider feature.

Start by inheriting LogarithmicNumericTickProvider and overriding CalculateMajorTicks. The tickDelta passed in is a structure containing the MajorDelta and MinorDelta. You can control it directly here, then adjust if the output contains no values, e.g.

public class LogarithmicNumericTickProviderEx : LogarithmicNumericTickProvider
    protected override double[] CalculateMajorTicks(IRange<double> tickRange, IAxisDelta<double> tickDelta)
        // Try to calculate with MinorDelta = 0.1, MajorDelta = 1
        var altDelta = new DoubleAxisDelta(0.1, 1);
        var result = base.CalculateMajorTicks(tickRange, altDelta);

        // If that fails to give any ticks, try to calculate with the default parameters passed in
        if (result == null || result.Length == 0)
            return base.CalculateMajorTicks(tickRange, tickDelta);

        return result;

    // TODO: Do the same for CalculateMinorTicks

Hope this helps!

Best regards,

  • Stuart McCullough
    Thanks Andrew - that'll give me something to play with if they change their minds back to the original requirement again. :-(
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.