WPF Charting Documentation - SciChart WPF Charts SDK v5.x
LineArrowAnnotation Class
Members  Example 
The LineArrowAnnotation provides a Line with X1,Y1,X2,Y2 coordinates and an arrow head at the tip.
Object Model
LineArrowAnnotation ClassIAnnotationCanvas InterfaceIAnnotationCanvas InterfaceIChartModifierSurface InterfaceAnnotationBase ClassIAnnotationCanvas InterfaceIAnnotationCanvas InterfaceIChartModifierSurface InterfaceAnnotationBase ClassISciChartSurface InterfaceIMainGrid InterfaceAnnotationCoordinates StructureIServiceContainer InterfaceIAxis InterfaceIAxis InterfaceISciChartSurface InterfaceIAnnotationCanvas InterfaceAnnotationCollection ClassIAnnotation InterfaceIAnnotationCanvas InterfaceIChartModifier InterfaceIGridLinesPanel InterfaceIChartModifierSurface InterfaceIRenderSurface InterfaceIMainGrid InterfaceIServiceContainer InterfaceIViewportManager InterfaceAxisCollection ClassIAxis InterfaceIAxis InterfaceAxisCollection ClassIAxis InterfaceIAxis InterfaceIZoomHistoryManager InterfaceIMainGrid InterfaceAnnotationCoordinates StructureIServiceContainer InterfaceIAxis InterfaceIRange InterfaceIRange InterfaceILabelProvider InterfaceIAnnotationCanvas InterfaceISciChartSurfaceBase InterfaceIServiceContainer InterfaceITickProvider InterfaceIRange InterfaceIRange InterfaceIAxis InterfaceIRange InterfaceIRange InterfaceILabelProvider InterfaceIAnnotationCanvas InterfaceISciChartSurfaceBase InterfaceIServiceContainer InterfaceITickProvider InterfaceIRange InterfaceIRange Interface
Syntax
[TemplatePart(Name="PART_ArrowHead", Type=System.Windows.Shapes.Polygon)]
[TemplatePart(Name="PART_LineAnnotationRoot", Type=System.Windows.Controls.Grid)]
[TemplatePart(Name="PART_Line", Type=System.Windows.Shapes.Line)]
[TemplatePart(Name="PART_GhostLine", Type=System.Windows.Shapes.Line)]
[AbtLicenseProvider()]
public class LineArrowAnnotation : LineAnnotationBase, IAnnotation, SciChart.Core.Framework.IHitTestable, SciChart.Core.Framework.ISuspendable  
Example
Shows how to create and add a LineArrowAnnotation to a SciChartSurface in XAMLShows how to create and add a LineArrowAnnotation to a SciChartSurface in Code
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/scichart"-->
<s:SciChartSurface>
   <!-- RenderableSeries omitted for brevity -->
            
   <s:SciChartSurface.XAxis>
      <s:NumericAxis Id="DefaultAxisId"/>
   </s:SciChartSurface.XAxis> 
   <s:SciChartSurface.YAxis>
      <s:NumericAxis Id="DefaultAxisId"/>
   </s:SciChartSurface.YAxis>
            
   <s:SciChartSurface.Annotations>
      <!-- Declare a LineArrowAnnotation at X1,X2,Y1,Y2 -->
      <!-- NOTE: XAxisId and YAxisId are optional if you use default Ids on a single X,Y Axis -->
      <s:LineArrowAnnotation X1="1" X2="2" Y1="3" Y2="4" 
                        HeadWidth="8.0"
                        HeadLength="4.0"
                        Stroke="Orange" StrokeThickness="2" StrokeDashArray="2 2"
                        AnnotationCanvas="AboveChart"
                        IsSelected="False"
                        IsEditable="False"
                        XAxisId="DefaultAxisId"
                        YAxisId="DefaultAxisId" />
   </s:SciChartSurface.Annotations>
</s:SciChartSurface>
var sciChartSurface = new SciChartSurface();
sciChartSurface.XAxis = new NumericAxis() { Id = "DefaultAxisId" };
sciChartSurface.YAxis = new NumericAxis() { Id = "DefaultAxisId" };
            
// Declare a LineArrowAnnotation at X1,X2,Y1,Y2
// NOTE: XAxisId and YAxisId are optional if you use default Ids on a single X,Y Axis
sciChartSurface.Annotations.Add(new LineArrowAnnotation() 
{
   X1 = 1, X2 = 2, Y1 = 3, Y2 = 4, 
   HeadLength = 4.0, 
   HeadWidth = 8.0,
   Stroke = new SolidColorBrush(Colors.Orange), 
   StrokeThickness = 2, 
   StrokeDashArray = new DoubleCollection(new double[] { 2, 2 }),
   AnnotationCanvas = AnnotationCanvas.AboveChart, 
   IsSelected = false, 
   IsEditable = false, 
   XAxisId = "DefaultAxisId", 
   YAxisId = "DefaultAxisId",
});
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     System.Windows.Controls.ContentControl
                        SciChart.Charting.ChartModifiers.ApiElementBase
                           SciChart.Charting.Visuals.Annotations.AnnotationBase
                              SciChart.Charting.Visuals.Annotations.LineAnnotationBase
                                 SciChart.Charting.Visuals.Annotations.LineArrowAnnotation
                                    SciChart.Charting.Visuals.Annotations.LineArrowAnnotationForMvvm

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LineArrowAnnotation Members
SciChart.Charting.Visuals.Annotations Namespace

 

 


SCICHART ® is a Registered Trademark in the UK, US and EU. Copyright SciChart Ltd 2011-2018.

Send Feedback