Pre loader

Always show VisibeRange min/max labels on X-axis.

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


I’m sure I have seen this before on the forum or knowledge base, but I’m unable to find the page again.

I want the min and max of the visible range (DateRange) to be visible on the X-axis of a chart, no matter what. I tried to do this by overriding GetMajorTicks which simply added the min as first item inthe list and the max as last item. This works sometimes, but often the labels do not show up. How do I force SciChart to always show the min and max labels?
The visibility of the min and max labels should have precedence over any other label/tick.

  • You must to post comments

Hi Steffan,

Your approach with overriding the GetMajorTicks() / TickProvider is correct. However, if the labels sometimes do not show, it is likely that they are being culled. You can disable this by setting AxisBase.IsLabelCullingEnabled = false.

Best regards,

  • You must to post comments

Hello Andrew,

Disabling culling indeed prevents the labels from being removed, but this is not exactly what I want. Culling is allowed, but the min and max labels should always be there.

I do not understand the behavior shown in the attached image with label culling feature disabled. In the first image it removes all labels but one, while in the second image all labels are visible. For some reason the culling now removes both labels when they overlap?

  • Andrew Burnett-Thompson
    As soon as you customize a tick provider, the culling no longer works. This is because our culling alg is dependent on the assumption tick provider is unmodified. The only way I’m afraid is custom tick provider and culling OFF. This will display all labels. It won’t cull if they overlap
  • _ _
    I want the ticks/gridlines to be shown, but I don’t want the labels to be shown when they overlap. I guess I will have to implement some “close to min/max” boundary culling with a custom label provider.
  • You must to post comments
Showing 2 results