The only difference is that SCIAxisLabelAnnotation can be placed on the X-Axis or the Y-Axis instead of the Chart Surface.
That’s is specified via the ISCIAnnotation.annotationSurface property.
It accepts a member of the SCIAnnotationSurfaceEnum enumeration and it defaults to XAxis for the AxisMarkerAnnotation.
// Assume a surface has been created and configured somewhere
id<ISCIChartSurface> surface;
// Create SCICustomAnnotation instance
SCIAxisLabelAnnotation *axisLabelAnnotation = [SCIAxisLabelAnnotation new];
// Set the text
axisLabelAnnotation.text = @“Axis Label can be Rotated”;
// Specify a SCIFontStyle for the text
axisLabelAnnotation.fontStyle = [[SCIFontStyle alloc] initWithFontSize:20 andTextColorCode:0xFFFF1919];
// Specify rotation Angle in Degrees if needed
axisLabelAnnotation.rotationAngle = -30;
// Specify a desired position by setting the X1 coordinate, since the marker is going to be located on an X axis
axisLabelAnnotation.x1 = @(60);
// Specify the desired Axis to place annotation on via SCIAnnotationSurface
axisLabelAnnotation.annotationSurface = SCIAnnotationSurface_XAxis;
// Allow to interact with the annotation in run-time
axisLabelAnnotation.isEditable = YES;
// In a multi-axis scenario, specify the XAxisId and YAxisId
axisLabelAnnotation.xAxisId = BottomAxisId;
axisLabelAnnotation.yAxisId = LeftAxisId;
// Add the annotation to the Annotations collection of the surface
[self.surface.annotations add:axisLabelAnnotation];
// Assume a surface has been created and configured somewhere
let surface: ISCIChartSurface
// Create SCICustomAnnotation instance
let axisLabelAnnotation = SCIAxisLabelAnnotation()
// Set the text
axisLabelAnnotation.text = “Axis Label can be Rotated”
// Specify a SCIFontStyle for the text
axisLabelAnnotation.fontStyle = = SCIFontStyle(fontSize: 20, andTextColorCode: 0xFFFF1919)
// Specify rotation Angle in Degrees if needed
axisLabelAnnotation.rotationAngle = -30
// Specify a desired position by setting the X1 coordinate, since the marker is going to be located on an X axis
axisLabelAnnotation.set(x1: 60)
// Specify the desired Axis to place annotation on via SCIAnnotationSurface
axisLabelAnnotation.annotationSurface = .xAxis
// Allow to interact with the annotation in run-time
axisLabelAnnotation.isEditable = true
// In a multi-axis scenario, specify the XAxisId and YAxisId
axisLabelAnnotation.xAxisId = BottomAxisId
axisLabelAnnotation.yAxisId = LeftAxisId
// Add the annotation to the Annotations collection of the surface
self.surface.annotations.add(axisLabelAnnotation)
// Assume a surface has been created and configured somewhere
IISCIChartSurface surface;
// Create SCICustomAnnotation instance
var axisLabelAnnotation = new SCIAxisLabelAnnotation();
// Set the text
axisLabelAnnotation.Text = “Axis Label can be Rotated”;
// Specify a SCIFontStyle for the text
axisLabelAnnotation.FontStyle = new SCIFontStyle(20, 0xFFFF1919);
// Specify rotation Angle in Degrees if needed
axisLabelAnnotation.RotationAngle = -30;
// Specify a desired position by setting the X1 coordinate, since the marker is going to be located on an X axis
axisLabelAnnotation.Y1Value = 60;
// Specify the desired Axis to place annotation on via SCIAnnotationSurface
axisLabelAnnotation.AnnotationSurface = SCIAnnotationSurface.XAxis;
// Allow to interact with the annotation in run-time
axisLabelAnnotation.IsEditable = true;
// In a multi-axis scenario, specify the XAxisId and YAxisId
axisLabelAnnotation.XAxisId = BottomAxisId;
axisLabelAnnotation.YAxisId = LeftAxisId;
// Add the annotation to the Annotations collection of the surface
Surface.Annotations.Add(axisLabelAnnotation);
NOTE: To learn more about other Annotation Types, available out of the box in SciChart, please find the comprehensive list in the Annotation APIs article.
NOTE: Be aware, if you use canEditText (allows edit text in run-time) in conjunction with isEditable (allows drag annotation over that chart), you will need to perform 2 taps - first one to select annotation, and only after that - tap to enter editing.