SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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’m trying to limit the x-axis panning up to an annotation that I’ve drawn on the graph. This annotation can be beyond the current data’s position (i.e. data’s timestamp is at 5/4/2017 11:00:00, annotation’s position is at 5/4/2017 16:00:00). Is there a method, or any way that I can use to limit the x-axis panning up to the annotation’s position instead of limiting it to the data series’ max X?


iOS v1.2.4.1045_SDK
  • You must to post comments


There is one workaround for you.

xMaxMarker = [[SCIAxisMarkerAnnotation alloc] init];
xMaxMarker.coordMode = SCIAnnotationCoord_Absolute;
xMaxMarker.xAxisId = @"xAxis";
xMaxMarker.position = SCIGeneric(9); = [[SCIPenSolid alloc] initWithColorCode:0xAFFFFF00 Width:1]; = [UIColor fromColorCode:0xFFCFCF30]; = CGAffineTransformMakeRotation(M_PI_2);

axis = [[SCINumericAxis alloc] init];
[axis setAxisId: @"xAxis"];

[axis registerVisibleRangeChangedCallback:^(id<SCIRange> newRange, id<SCIRange> oldRange, BOOL isAnimated, id sender) {
    double maxNewRange = SCIGenericDouble([newRange max]);
    double xMaxAnnotation = SCIGenericDouble(_xMaxMarker.position);

    if (maxNewRange > xMaxAnnotation) {
        [axis setVisibleRange:[[SCIDoubleRange alloc] initWithMin:[oldRange min] Max:_xMaxMarker.position]];

Best Regards, Mykola

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.