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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.


I want to set the gap between top and bottom of the axis with respect to the data for example if my data range is between 3 to 15 then i want to set the visible range 2 to 16 like that.The same is happened when the chartsurface.zoomextents(),how the offset is calculated,how can i set manually?. Please see the attached images how can i set the same gap as manually like zoomextents.

  • You must to post comments

Good morning Raghupathy,

In order to add a gap above/below data always, firstly you can use AxisBase.GrowBy. This adds a fractional amount above and below the data when auto-ranging or zooming to extents. For instance:

// Adds 10% below Min and 20% above Max
AxisBase.GrowBy = new DoubleRange(0.1, 0.2);

If you require precise control over the Axis VisibleRange on zoom extents, you will need to override AxisBase.GetMaximumRange()

public class CustomAxis : NumericAxis
    public override IRange GetMaximumRange()
        var baseRange = base.GetMaximumRange() as DoubleRange;

        // Always return a range with +/- 1 padding
        return new DoubleRange(baseRange.Min - 1, baseRange.Max + 1);

Best regards,

  • Raghupathy
    Thank you Andrew it helps a lot.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.